V2AI / Det3D

World's first general purpose 3D object detection codebse.
https://arxiv.org/abs/1908.09492
Apache License 2.0
1.48k stars 299 forks source link

Size of direction targets in detector head #112

Closed afroowoo closed 4 years ago

afroowoo commented 4 years ago

Hi and thanks for your work.

I have a question regarding the following piece of code: https://github.com/poodarchu/Det3D/blob/255c5937014cf65d5eac3c1066a84d7c719b1ef3/det3d/models/bbox_heads/mg_head.py#L468-L470

What does num_dir = num_a * 2 represent? If there is only 1 class, why are 4 direction targets needed? Aren't the 2 different orientations already encapsulated in self.num_anchor_per_locs = [2 * n for n in num_classes]?

tianweiy commented 4 years ago

each anchor is just an object. And each object will have two directions.

poodarchu commented 4 years ago

You can add more directions. For example, if you need a more concise divisivion of rotations,you can add more directions in https://github.com/poodarchu/Det3D/blob/master/examples/cbgs/configs/nusc_all_vfev3_spmiddleresnetfhd_rpn2_mghead_syncbn.py#L79, and change num_dir from 2 num_anchor to N num_anchor.