Skip to content

why need add 1 ? #18

@xinfangliu

Description

@xinfangliu

in utils/eval.py
def iou(pred, gt):
intersection = max(0, min(pred[1], gt[1]) + 1 - max(pred[0], gt[0]))
union = max(pred[1], gt[1]) + 1 - min(pred[0], gt[0])
return float(intersection)/union

if
p=[3,5]
g=[4,6]
then the iou should be (5-4)/(6-3)=0.33333
but iou(p,g)=0.5
Did I get it wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions