You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of line 115 : boxes1 = tf.transpose(boxes1, [1, 2, 3, 0]) is not with format [y1, x2, y2, x1]. Actually, boxes1 is a 4-D tensor, the tf.transpose operation change the order of dimensions from [0,1,2,3] to [1,2,3,0].
To understand why there is a transpose operation, we have to take line 114 and 115 together into consideration.
In line 114, the coordinate 'data format' was transformed from [center_x,center_y,w,h] to [x_min,y_min,x_max,y_max] and then stack the four tensor to be one with the default parameter 'axis=0', thus the result tensorboxes1 is no longer has the same shape before tf.stack() operation. So the transpose operation is aim to transform the shape of tensor boxes1 to original.
Actually, line 114 and 115 can be written as a single line:
at line 115 : boxes1 = tf.transpose(boxes1, [1, 2, 3, 0])
the boxes1 data format transform from [cx, cy, w, h] to [x1, y1, x2, y2] yet.
why there is line 115 convet format to [y1, x2, y2, x1] ????
I don't understand
thanks
The text was updated successfully, but these errors were encountered: