tianweiy / CenterPoint

MIT License
1.85k stars 450 forks source link

Some doubts in code #42

Closed anuj-sharma-19 closed 3 years ago

anuj-sharma-19 commented 3 years ago

Hi,

First of all thanks for the great work and sharing the code. :+1:

I am trying to use your code on my custom dataset. I am using Centerpoint-PointPillars model with circle-nms and while scanning through the code, had following doubts:

  1. During preprocessing, the dimensions (length and width) are scaled to the final feature resolution https://github.com/tianweiy/CenterPoint/blob/master/det3d/datasets/pipelines/preprocess.py#L671, but during predict step, these are not decoded back into original meter space https://github.com/tianweiy/CenterPoint/blob/master/det3d/core/utils/center_utils.py#L342. I am not sure if that's right; though in nuscenes evaluations, it might not impact, since it looks for distance based metric rather than IOU.

  2. In the circle_nms, I presume the min_radius as defined in the test_cfg is in meters, but in the circle_nms_jit, it uses this radius value for comparison against L2-distance https://github.com/tianweiy/CenterPoint/blob/master/det3d/core/utils/circle_nms_jit.py#L26. Does this mean that this radius is actually distance squared, or am I missing something?

Could you please clarify my above doubts?

Looking forward to your reply.

Thank You.

Anuj

tianweiy commented 3 years ago

Hi, thanks for the interest. The target is actually in the meter space https://github.com/tianweiy/CenterPoint/blob/e2fc27918a451f908bb4dd979326557b0dfa7c9a/det3d/datasets/pipelines/preprocess.py#L714 the refered line is only for the if check below, which seems useless. I will remove them in the next refactoring.

Yeah, it is distance squared. https://github.com/tianweiy/CenterPoint/blob/e2fc27918a451f908bb4dd979326557b0dfa7c9a/configs/centerpoint/nusc_centerpoint_pp_02voxel_circle_nms.py#L85

anuj-sharma-19 commented 3 years ago

Hi,

Thanks for the clarification. My bad, I did not see later that the targets are actually in meter space. 👍

Thanks !!