Skip to content

YOLOv4 annotations bounding box #206

@adnankarol

Description

@adnankarol

@AlexeyAB
Output of YOLO
class1: 30% (left_x: 1594 top_y: 5 width: 823 height: 398)
class2: 89% (left_x: 1624 top_y: 11 width: 766 height: 384)

Ground Truth File
class2 0.6834710743801653 -0.0007513148009012858 0.9954545454545455 0.9984973703981965
class1 0.6875436293114982 0.00983195749251466 0.9105397751844504 0.989553997972583

I need to Transform the Output of YOLO to Ground Truth File ---- MAIN DOUBT

Format for Ground Truth File :
x1min y1min x2max y2max

Format of YOLO :
<x_center> <y_center>

One formula which I had was for YOLO to Ground Truth

x1min = (xc - (0.5 * w))/img_w
x2max = (xc + (0.5 * w))/img_w
y1min = (yc - (0.5 * h))/img_h
y2max = (yc + (0.5 * h))/img_h

This gave output as
class1 0.48863636363636365 -0.485 0.8287190082644628 0.51
class2 0.5128099173553718 -0.4525 0.8293388429752067 0.5075

This is close but not exactly the same as Ground Truth

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