Skip to content

the diou loss function has bugs? #6

@chenying99

Description

@chenying99
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions