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

target assign cost too much,and gpu util is low, how to improve it ? #168

Closed chenrui17 closed 1 year ago

chenrui17 commented 1 year ago

when i set batch_size = 15, class_num = 6,and there are batch_size*class_num(90) times target assign operation, code is here : https://github.com/poodarchu/Det3D/blob/master/det3d/core/anchor/target_assigner.py#L31, and by profile the program, this part accounts for about ~30% of the train time. so how to improve it ?

poodarchu commented 1 year ago

you can move target assign step into model forward function, this can accelerate the speed by a large margin. or you can wait for my new codebase release, which is 3x faster than this Det3D.