Confusion about the output of scale_boxes in Week3

I’m confused as to how to interpret the output of scale_boxes used in yolo_eval from Programming Exercise 1 of Week 3. A sample output of scale_boxes is printed below:

tf.Tensor(
[[-1660.1853 -962.1445 4010.9219 3229.5237 ]
[-3181.6729 -791.9485 1259.208 -2015.9739 ]
[-1641.3152 -155.43259 -7446.462 3651.87 ]

[ 572.99536 -3691.4465 -3334.7424 1735.5779 ]
[ 1303.331 -3216.2083 -4059.7803 -623.29926]
[ 3885.4934 524.3604 690.8977 658.6899 ]], shape=(1786, 4), dtype=float32)

Does each row represent the absolute coordinates (y1, x1, y2, x2) of a box relative to some reference point? Are these pixel values, because if so, I’m confused as to why their magnitudes are so large given the image is 720x1280.

Hi LuBinLiu,

Great to see that you try to understand the outputs.
Yes, I recommend that you have a look at the scale_boxes function, code is available

As said in the thread it is transforming the yolo coordinates to some generic box coordinates, that is why the big numbers.

Happy learning,

Rosa

I’m not sure the source code for scale_boxes is going to explain why there are negative numbers in the output matrix. To the best of my knowledge, the answer for that is that the course designers used a random number distribution centered around a mean of zero as input. It produces values that don’t make sense for this context. Same is true for the other variables in this section; IRL they are probabilities and should range between 0 and 1. Instead they also include values less than 0 and greater than 1. I think the shapes make sense in this section, but the values should be ignored.