xingyizhou / CenterNet2

Two-stage CenterNet
Apache License 2.0
1.2k stars 188 forks source link

why add strides_expanded / 2? #46

Open pengcheng001 opened 3 years ago

pengcheng001 commented 3 years ago

📚 Documentation

In the CenterNet2/centernet/modeling/dense_heads/centernet.py file, when calculating the distribution of center points, centers_discret = ((centers_expanded / strides_expanded).int() * strides_expanded).float() + trides_expanded / 2 # M x N x 2, why add strides_expanded / 2?

xingyizhou commented 3 years ago

Thank you for the question and sorry for the delayed response. This follows RetinaNet to put the point in the center of each grid. This is useful when the output stride is large (i.e., in FPN the maximal stride is 128).