zhuoxiao-chen / ReDB-DA-3Ddet

[ICCV 2023] Revisiting Domain-Adaptive 3D Object Detection by Reliable, Diverse and Class-balanced Pseudo-Labeling
Apache License 2.0
46 stars 8 forks source link

`SHIFT_COOR` in DB Sampler #5

Open malicd opened 9 months ago

malicd commented 9 months ago

Hi,

Thank you for making the code publicly available!

Could you please help me understand a few things in your repository?

In this section of the code, you are shifting the points that are already shifted in the respective dataset classes. Why are you doing this? Am I missing something?

When the DB sampler searches for potential boxes to add to the scene, the sampled_boxes and the existed_boxes have different Z alignments. This is because the data_dict['gt_boxes'] are already shifted in the respective dataset classes. Shouldn't they also be Z-aligned here?

Best wishes, Dusan

zhuoxiao-chen commented 7 months ago

Thanks for pointing out this.

It should be shifting obj_points rather than points.

existed_boxes and points are already shifted during __getitem__, while during augmentation (sampling), the sampled_boxes and points obj_points within sampled boxes are not shifted. That's why we need to shift both sampled boxes and sample points like this:

if cfg.DATA_CONFIG.get('SHIFT_COOR', None): 
    obj_points[:, 0:3] += cfg.DATA_CONFIG.SHIFT_COOR
    sampled_gt_boxes[:, 0:3] += cfg.DATA_CONFIG.SHIFT_COOR