yhenon/pytorch-retinanet

Question about shifting anchors

Closed this issue · 1 comments

In anchors.py file, line 110 and 11:

shift_x = (np.arange(0, shape[1]) + 0.5) * stride 
shift_y = (np.arange(0, shape[0]) + 0.5) * stride

Can somebody explain why we need to add 0.5 in two lines above?

to get central coordinate of the anchor box.