xcenternet icon indicating copy to clipboard operation
xcenternet copied to clipboard

the diou loss function has bugs?

Open chenying99 opened this issue 2 years ago • 0 comments

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

chenying99 avatar Sep 02 '21 11:09 chenying99