Open muye5 opened 6 years ago
@clive819 after reading the paper, sorry not very clear yet. i think:
conf_delta = object_mask * (pred_box_conf - true_box_conf) * self.obj_scale + (1 - object_mask) * conf_delta * self.noobj_scale
only this line is enough because of object_mask & noobj_mask
.
what's the purpose of this line.
conf_delta *= tf.expand_dims(tf.to_float(best_ious < self.ignore_thresh), 4)
fill some elements with zero? These elements will multiply with mask tensor, so why we need this step?
Elements that does overlap a ground truth object by more than self.ignore_thresh will be zero, so they won't be included in loss_conf.
If the bounding box prior is not the best but does overlap a ground truth object by more than some threshold we ignore the prediction, following [17].
@clive819 got it. thank you very much.
I cannot understand why
true_boxes
need to be passed into YoloLayer.conf_delta *= tf.expand_dims(tf.to_float(best_ious < self.ignore_thresh), 4)
this line filter out some elements which matchtrue_boxes
, but how it effect the loss,conf_delta = object_mask * (pred_box_conf - true_box_conf) * self.obj_scale + (1 - object_mask) * conf_delta * self.noobj_scale
why normalizing of loss missed in yolo3. not same with yolo2.
loss_xy = tf.reduce_sum(tf.square(xy_delta), list(range(1, 5)))
thanks!