hizhangp / yolo_tensorflow

Tensorflow implementation of YOLO, including training and test phase.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The issue of calculate center_x and center_y

MingtaoGuo opened this issue · comments

[(predict_boxes[..., 0] + offset) / self.cell_size,

predict_boxes_tran = tf.stack(
[(predict_boxes[..., 0] + offset) / self.cell_size,
(predict_boxes[..., 1] + offset_tran) / self.cell_size,
tf.square(predict_boxes[..., 2]),
tf.square(predict_boxes[..., 3])], axis=-1)

I think it is supposed to be as follow:

predict_boxes_tran = tf.stack(
[(predict_boxes[..., 0] + offset) * self.image_size/ self.cell_size,
(predict_boxes[..., 1] + offset_tran) * self.image_size/ self.cell_size,
tf.square(predict_boxes[..., 2]),
tf.square(predict_boxes[..., 3])], axis=-1)

Does it work after you modified it like you said?

Does it work after you modified it like you said?

Sorry, I didn't use this code, because I reimplemented yolo1 and yolo2 in my repository by myself.