-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gap w/ OpenPCDet for SECOND and PointPillars #648
Comments
Hi @Divadi , sorry for the late reply. I'm not sure about the reason behind the performance gap, yet the difference between NMS may be possible for causing the gap. |
Hi, @Divadi @THU17cyz, I have been watching this thread for weeks, still no progress? Maybe we could share the information here if you find any potential reason or anything suspicious. I did a simple comparison between the training configs of PointPillars on kitti used by the 2 codebases and found these differences:
I am currently doing experiments to align the data pipeline but it is really laborious. I hope somebody could give me a hand. |
Hi @zhanggefan. Thank you very much for sharing your discoveries! Recently we have been busy with other lines of work, so we haven't looked into this issue yet. From my point of view, the use of ground planes should boost the performance. Maybe @Tai-Wang can take a look? |
@THU17cyz, I just finished a round of training and takes the ground plane into account during gt sampling (messy experimental code and not ready for PR so please don't ask for it here, hahaha). What surprises me is that the AP score even drops... But this is not the weirdest.I switched to the refactored coordinates branch today, and from #913 I know that there is a performance gap of around 1% compared to the master branch. In one of the experiments (Pointpillars on Kitti 3 classes) I did today I accidentally swapped all of the w and h of the anchor settings, but it improves the final AP score by around 1%. Especially for cyclist class, the AP increases by 4%. I used the training schedule of 12 * 4 with 3090s and got an average AP score of 61.5% (overall moderate strict). I guess there is still something wrong with the new branch. Training logs are attached here for your information: swapped w&h: mAP 61.5 correct one: mAP 60.5 |
Oh you're really fast lol. I'm not familiar with the effect of the planes, but I'm responsible for the refactored coordinate system, and your finding is really interesting. May you elaborate more on how you switched w and h, say, provide the fraction of modified config? |
By the way, did you generate new db_infos for KITTI |
Of course I did, but after all, I had to modify the data convert script and regenerate files so that I can put the plane information into the pickle files. |
The configs are dumped into the head of the log files. |
Hmmm sorry I missed the logs viewing from my phone. I see. However I remember using the original anchor config hurts the performance months ago...Please give me some time to look into this. |
@THU17cyz, @Tai-Wang Here are some more discoveries concerning the performance gap compared to OpenPCDet
|
A couple other points I've noticed before:
Other differences: SECOND: I'll keep posting as I remember/find things |
@zhanggefan Did you try an experiment without object noise? |
@Divadi I tried it today but found no improvement. But here is the good newsThe config for the anchor generator is absolutely wrong!!! The centers of the generated anchors turn out to have wrong stride! And I believe it is possibly a day zero bug. @THU17cyz @Tai-Wang mmdetection3d/configs/_base_/models/hv_pointpillars_secfpn_kitti.py Lines 40 to 42 in 2efdb6b
|
I just started an experiment to examine how much impact this bug has on the result. The correct config should be
It shows that for ranged anchors the anchors' center bias w.r.t the feature map positions is up to 1.44 meters. It must have introduced some sort of feature-prior misalignment and thus hurts the feature extractor's performance, and influences the anchor-gt assignment as well. |
Wow, great observations @Divadi , @zhanggefan ! I'm not very familiar with the anchors, and now I have enrolled in graduate school and cannot maintain MMDet3D like before : ( But I will still keep an eye on this thread and add my opinions! |
Update:
The next experiment I am planning to do is aligning the behavior of the assigners by setting |
With reference to the anchor offset - then does this issue exist over the entire repository? |
@Divadi The error only affects the results of pointpillars on kitti, including both 3 classes and car-only results. mmdetection3d/configs/_base_/models/hv_pointpillars_secfpn_kitti.py Lines 40 to 42 in 2efdb6b
It is not just the center misalignment by half feature map stride. The value 70.4 is simply wrong. I believe the author just copied and pasted the existing configs from SECOND and forgot to adjust some of the values according to the different voxelization range for pointpillars. The voxelization range for SECOND is [0, -40, -3, 70.4, 40, 1], different from the range [0, -39.68, -3, 69.12, 39.68, 1] for pointpillars. The OpenPCDet's config does introduce center misalignment as well, but the maximum misalignment bias is only 0.16 m, which is way smaller than the bias of 1.44 m we have here in MMDet3D. I just finished the experiment of "assignment behavior aligning" and the gap is finally gone. The best result of pointpillars on kitti now is:
|
Ah, I understand - it's the 69.12 vs 70.4 for PointPillars |
Hi @zhanggefan @Divadi , awesome study! Sorry for the little late reply. The overall study has been really exhaustive, so let me conclude and share some experiences.
|
Hi, @Tai-Wang |
Hi, @zhanggefan |
Another point I just found was that for cut & paste augmentation, the "filter by difficulty" does nothing for KITTI.
Is where difficulty is stored in the GT database. However,
in kitti_dataset does not store "difficulty" in the returned dict, so all objects are given difficulty "0", hence nothing being filtered for cut and paste. This is unlike openpcdet where objects with difficulty "-1" are not used for cut & paste. |
Hi @zhanggefan , I went through the refactoring again and it seems the anchors should be [l, w, h] instead of [w, l, h] logically... Maybe we can ask someone to work on this and figure it out. |
Yep, [l, w, h] is absolutely logically correct. I think the weird score improvement might relate to the config bug. I am not sure either. But anyway, I think the problem is solved after the config bug is fixed. The best score I got so far with point pillars on Kitti is 64.9 Overall. BTW, taking the behavior of the stride-conv into account, the best config for anchor range should be:
|
@zhanggefan Hello, Did you do these modifications on the dev branch? or on the master branch? |
@ZCMax Hi, I did those on the dev branch. |
@ZCMax @zhanggefan Hi, I think the anchor range has a little difference compared to OpenPCDet. # align_center = False
# self.anchor_range = [0, -39.68, -3, 69.12, 39.68, 1]
# grid_size = [216, 248]
# anchor_height = -1.78 # car for example
if align_center:
x_stride = (self.anchor_range[3] - self.anchor_range[0]) / grid_size[0]
y_stride = (self.anchor_range[4] - self.anchor_range[1]) / grid_size[1]
x_offset, y_offset = x_stride / 2, y_stride / 2
else:
x_stride = (self.anchor_range[3] - self.anchor_range[0]) / grid_size[0]
y_stride = (self.anchor_range[4] - self.anchor_range[1]) / grid_size[1]
x_offset, y_offset = 0, 0
x_shifts = torch.arange(self.anchor_range[0] + x_offset, self.anchor_range[3] + 1e-5, step=x_stride, dtype=torch.float32).cuda()
y_shifts = torch.arange(self.anchor_range[1] + y_offset, self.anchor_range[4] + 1e-5, step=y_stride, dtype=torch.float32).cuda()
z_shifts = x_shifts.new_tensor(anchor_height) |
Comparing Car moderate 3D strict results from this repository with that of OpenPCDet, there seems to be a 2~3 point difference:
SECOND: 76.91425 (here) vs 78.62 (OpenPCDet)
PointPillars: 73.88344 (here) vs 77.28 (OpenPCDet)
I was wondering if anyone had some clues to why this difference might occur.
Is it the BEV NMS used in this repository vs 3D rotated NMS in OpenPCDet perhaps?
The text was updated successfully, but these errors were encountered: