simple-faster-rcnn-pytorch
simple-faster-rcnn-pytorch copied to clipboard
one question on loc2bbox
so this function is to move a given bbox (src_bbox) to offset (loc) which is given as (dy,dx,dh,dw)
src_height = src_bbox[:, 2] - src_bbox[:,0]
src_width = src_bbox[:, 3] - src_bbox[:, 1]
src_ctr_y = src_bbox[:, 3] + 0.5*src_height
src_ctr_x = src_bbox[:, 1] + 0.5*src_width
then I think this code (which I believe is computing the center and height, width of bbox) above should be
src_height = src_bbox[:, 2] - src_bbox[:,0]
src_width = src_bbox[:, 3] - src_bbox[:, 1]
src_ctr_y = src_bbox[:, **0**] + 0.5*src_height
src_ctr_x = src_bbox[:, **1**] + 0.5*src_width
since 1 and 3 index will be y0,y1 whereas 0, 1 index will be x0, y0??