hizhangp / yolo_tensorflow

Tensorflow implementation of YOLO, including training and test phase.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Labels generated has some issue

aditya1709 opened this issue · comments

The labels being generated in pascal_voc.py in load_pascal_annotation() -

  1. The standard being followed in the paper is [x,y,w,h,c] where c is the confidence score. This is not being followed in your implementation.
  2. Even though the final layer uses linear activation - the values in the labels are all between 0 and 1. But in this implementation the height and width are not scaled by the size of the image ( which in this case is 448)
commented

the confidence score is calculated in loss_layer() by confidence = Pr(object) * IOU

labels have not been scaled by image size ?

commented

@stutys the bounding box is scaled in function load_pascal_annotation(self, index) in pascal_voc.py

@CV-Bowen Hi, could you please tell me why the bounding boxes labels of the same cell was set to be the same?

boxes = tf.tile(
boxes, [1, 1, 1, self.boxes_per_cell, 1]) / self.image_size

why we can set the same value for 2 box for each cell? If the center of 2 different objects's bounding box located at the same cell, but we have 2 bounding box label x1,y1,w1,h1, x2,y2,w2,h2 have the same value, shouldn't them be different from each other??

Thanks

commented

@weiaicunzai In the loss computation, masks (object_mask and noobject_mask in yolo_net.py) are used to make one of the 2 boxes have no influence on the loss.

@CV-Bowen Thanks, yolov1 only predicts 1 object per cell, I know that now.