Closed hokim72 closed 5 years ago
The bound boxes values are between values between 0 and 1, and these values are normalized in relation to the grid, so the network doesn't need to know where is that object, just need to know that object are inside in the grid cell. in this line the value are normalized between 0 and 1, also it is referenced in which grid this coordinate are locate, it is necessary because the network doesn't need to know where is the object in the image, just in the grid, but the loss function need to know where this object are in the image, so with this normalization we can do it. And here we also normalize the predicted values in order to compare with the ground truth normalized in that way
Thanks for your reply center_x, center_y are normalized to 0 ~ GRID_W, 0 ~ GRID_H respectively. this and this x, y coordinate of box is not 0~1 but 0 ~ GRID_W(H)
But I understand what you mean As you said, y value of model has grid_x, grid_y but ground true box doesn't have such information So, x, y use absolute values ( 0~ GRID_W(H) ) instead of the relative values(0~1) for x,y coordinates
x,y are not between 0~1 because they have the grid index added into them
Hi I'm trying to understand yolo algorithm through your code I found something wrong(?) in calculating bonding box in preprocessing.py
box = [center_x, center_y, center_w, center_h] at line 197
The above center_x, center_y seem not to be the relative values to grid They should be center_x-grid_x, center_y-grid_y?