abeardear / pytorch-YOLO-v1

an experiment for yolo-v1, including training and testing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

choose the best iou box

mama110 opened this issue · comments

box1_xyxy[:,:2] = box1[:,:2]/14. -0.5*box1[:,2:4]

What's that code mean? Why divide 14 and multiply 0.5?
Thank you .

commented

box[:,:2] is the center of box, divide 14(grid num) to remap it to location relative to the whole image.

box[:,2:4] is the width and height of object, multiply 0.5 to compute top-left corner and bottom-right corner.