xcenternet
xcenternet copied to clipboard
the diou loss function has bugs?
the file loss.py in line 181 182 183:
euclidean = tf.linalg.norm(b2_center - b1_center)
diag_length = tf.linalg.norm([enclose_ymax - enclose_ymin, enclose_xmax - enclose_xmin])
diou = iou - (euclidean ** 2) / (diag_length ** 2)
the result of tf.linalg.norm is one value, but the train dataset has many samples (many bboxes)
diou = iou - (euclidean ** 2) / (diag_length ** 2)
the dimensions of iou is not equal to the dimensions of (euclidean ** 2) / (diag_length ** 2) ?
the last dimensions of iou is the number of bboxes, the last dimensions of (euclidean ** 2) / (diag_length ** 2) is one