W3 A1 Where is (0, 0) coordinate located?

The lecture states that the (0, 0) coordinate is located within a grid box, which leads me to believe that each grid box has its own coordinate system. However, the assignment indicates that the (0, 0) coordinate is positioned at the top-left corner of the image, suggesting that there is a single coordinate system for the entire image that is shared by all grid boxes. Please refer to my screenshots for more details. Thank you in advance for your response!


He covers that starting at about 10:25 into that lecture. Everything is relative to the grid cell containing the bounding box. The grid cell is specified to have (0,0) as the upper left corner and (1,1) as the lower right corner. Then everything is expressed relative to that.

Of course you can do the geometry to rescale everything to absolute coordinates relative to the complete image if that is required. This will also be covered in some detail in the YOLO assignment.

1 Like

Another detail to note is that bounding boxes do not need to be contained within the grid cells with which they are categorized. The algorithm assigns the bounding box to the grid cell that contains the centroid of the detected object, so the coordinates of the bounding box can be negative or can be > 1 if the bounding box is not completely contained within the grid cell. The centroid of the object is the center of the bounding box, which is easy to compute since it is a rectangle.

1 Like