HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
18.38k stars 2.31k forks source link

Exported YOLO Labels are Corrupt #5481

Open 1andDone opened 7 months ago

1andDone commented 7 months ago

When labeling images for segmentation in Label Studio, I have noticed a few instances where the exported YOLO labels are corrupted (they go below 0 or above 1).

Here's a few examples:

1 0.009318555008210182 0.004597701149425287 1.0001915708812261 0.014942528735632184 1.0 1.0 0.0 1.0 0.0015530925013683636 0.059770114942528735
1 0.0 0.0 0.5029174401232304 -0.0011254847734823994 0.504529304059381 1.0 0.003234159651848588 1.0
0 0.5061439936592977 0.002298850655350974 0.9985467925082516 0.0011494252873563218 0.9985467925082516 0.9965517241379309 0.5093778877304787 0.9977011492640108

This issue looks to be related to https://github.com/HumanSignal/label-studio/issues/5014

This happens mostly when labeling points on the boundary of the image.

biggeR-data commented 2 weeks ago

Hi, I just ran into the same problem. I have investigated it thoroughly and found out, that there is no conversion error at work here. Instead it's a result of a lack of annotation value range validation & visual display of boxes.

It occured only for other annotators, not myself, so I can only guess how this happened. I believe all of my users that caused this issue did use Windows OS on a laptop. It seems they bugged out and placed a box outside of the image bounds. So there were essentially boxes with a width / height over 100 or one of the X/Y coordinates was above 100 / below 0.

This was able to be submitted as an annotation (which it shouldn't in my opinion, so I suggest this needs some sort of validation) and the out-of-bounds box was not even displayed in the UI.

You can find it by navigating the classes tab and checking if a highlighted box in this tab is also highlighted in the UI. Delete the box not highlighted (you also see the faulty properties in the info tab) and all is solved.