labelmeai / labelme

Image Polygonal Annotation with Python (polygon, rectangle, circle, line, point and image-level flag annotation).
https://labelme.io
Other
13.11k stars 3.37k forks source link

There seems to be an issue with certain objects in the label images generated by <labelme_export_json> when opened with PIL.Image.open, where the labels and pixels don't match up correctly. #1436

Open CalvenYi opened 4 months ago

CalvenYi commented 4 months ago

Provide environment information

Python 3.8.19 labelme 5.4.1 Pillow 10.1.0

What OS are you using?

Ubuntu 20.04.4

Describe the Bug

I found an interesting issue. The labels I annotated using Labelme appear normal in the PNG images generated by , but when I open the label image using <lbl = np.asarray(PIL.Image.open(label_png))>, I notice that some pixel labels are incorrect. For example, the edges of some polygons or the centers of small objects have pixel label errors. label output show2 show1

Expected Behavior

I hope that PIL.Image.open(label_png) will display the same image as the one generated by labelme_export_json.

To Reproduce

No response