You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ which python; python --version; python -m pip list | grep labelme
/home/watanabe/work/YOLOX/pyenv/bin/python
Python 3.12.3
labelme 5.4.1
labelme2coco 0.2.6
What OS are you using?
Arch Linux on WSL2
Describe the Bug
I've partially identified the cause and have been able to proceed with the execution. However, I'd like to inquire about more detailed investigations and better solutions. Below is the error message I encountered during execution:
❯ ./labelme2coco.py val val4coco --labels class.txt
Creating dataset: val4coco
Generating dataset from: val/PXL_20211110_054923449.json
Traceback (most recent call last):
File "/home/watanabe/work/YOLOX/datasets/labelme/examples/instance_segmentation/./labelme2coco.py", line 203, in <module>
main()
File "/home/watanabe/work/YOLOX/datasets/labelme/examples/instance_segmentation/./labelme2coco.py", line 121, in main
mask = labelme.utils.shape_to_mask(img.shape[:2], points, shape_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/watanabe/work/YOLOX/pyenv/lib/python3.12/site-packages/labelme/utils/shape.py", line 30, in shape_to_mask
draw.rectangle(xy, outline=1, fill=1)
File "/home/watanabe/work/YOLOX/pyenv/lib/python3.12/site-packages/PIL/ImageDraw.py", line 316, in rectangle
self.draw.draw_rectangle(xy, fill, 1)
ValueError: y1 must be greater than or equal to y0
It appears that this issue is caused by the addition of assertions in a recent version update of Pillow. In my environment, Pillow version 10.3.0 did not work, but downgrading to version 9.1 resolved the issue and the behavior was as expected.
Provide environment information
What OS are you using?
Arch Linux on WSL2
Describe the Bug
I've partially identified the cause and have been able to proceed with the execution. However, I'd like to inquire about more detailed investigations and better solutions. Below is the error message I encountered during execution:
It appears that this issue is caused by the addition of assertions in a recent version update of Pillow. In my environment, Pillow version 10.3.0 did not work, but downgrading to version 9.1 resolved the issue and the behavior was as expected.
Expected Behavior
No response
To Reproduce
No response
The text was updated successfully, but these errors were encountered: