wkentaro / labelme

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

batch process mutilple json files failed #539

Closed li-zheng-hao closed 4 years ago

li-zheng-hao commented 4 years ago

Problem

i used the code in labelme/examples/semantic_segmentation/labelme2voc.py and the output result is not correct: 微信截图_20200106100307 I'm sure there is no problem with my markup,However, the output labeling result is incorrect.

  1. how can i get the file labels_file in labelme2voc.py, i just create the file and input my labels manually,like:
    __ignore__
    _background_
    obj
  2. why the mask and origin image is not match, like the mask rotate 90°?

my env:

  1. labelme: 3.16.0
  2. system: win10
  3. python: 3.6.0
wkentaro commented 4 years ago

Which one is rotated in the images you present? The gray background image (the real image) or red annotation?

li-zheng-hao commented 4 years ago

I update labelme version from 3.16.0 to 3.18.0. And here are my images:

  1. origin image 0

  2. generate JPEGImages folder image 0

  3. generate SegmentationClassPNG folder image 0

  4. generate SegmentationClassVisualization folder image 0

the code is copy from labelme2voc.py

@wkentaro

li-zheng-hao commented 4 years ago

and all images' shape is 4000×3000 ( width × height )

wkentaro commented 4 years ago

Can you possibly upload related files (original image, annotated json file, exported files) as zip? You can upload zip on GitHub comments.

li-zheng-hao commented 4 years ago

files.zip

wkentaro commented 4 years ago

The JSON file is missing?

li-zheng-hao commented 4 years ago

json.zip

sorry ,I forgot it ...

wkentaro commented 4 years ago

I reproduced. https://github.com/wkentaro/labelme/pull/543 will fix this.

li-zheng-hao commented 4 years ago

thank you very much