Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labelme2coco.py crash when just contines __ignore__ label #1212

Closed
withkun opened this issue Nov 6, 2022 · 4 comments
Closed

labelme2coco.py crash when just contines __ignore__ label #1212

withkun opened this issue Nov 6, 2022 · 4 comments
Labels
bug issue

Comments

@withkun
Copy link

withkun commented Nov 6, 2022

Provide environment information

(DET2) D:\FPCs>python --version
Python 3.9.13

(DET2) D:\FPCs>pip list labelme
Package Version Editable project location


labelme 5.0.5

What OS are you using?

windows11

Describe the Bug

(DET2) D:\FPCs>python D:/DeepLearning/labelme/examples/instance_segmentation/labelme2coco.py --labels classes.txt 000003 labels
Creating dataset: labels
Generating dataset from: 000003\dog.json
Traceback (most recent call last):
File "D:\DeepLearning\labelme\examples\instance_segmentation\labelme2coco.py", line 209, in
main()
File "D:\DeepLearning\labelme\examples\instance_segmentation\labelme2coco.py", line 184, in main
labels, captions, masks = zip(
ValueError: not enough values to unpack (expected 3, got 0)

Expected Behavior

Skip the label file

To Reproduce

  1. Just set ignore label of an image
  2. Create classes.txt file
  3. run labelme2coco.py
@withkun withkun added the bug issue label Nov 6, 2022
@withkun
Copy link
Author

withkun commented Nov 6, 2022

label file of dog.json
{
"version": "5.0.5",
"flags": {},
"shapes": [
{
"label": "ignore",
"points": [
[
1248.0740740740741,
445.7530864197531
],
[
1586.3456790123457,
1012.4197530864197
]
],
"group_id": null,
"shape_type": "rectangle",
"flags": {}
}
],
"imagePath": "dog.png",
"imageData": null,
"imageHeight": 1152,
"imageWidth": 2048
}

@HUBUwg96
Copy link

HUBUwg96 commented Jan 8, 2023

how to deal with?

@withkun
Copy link
Author

withkun commented Jan 10, 2023

Just skip it?

@qinli-jian
Copy link

The solution is here: #774

@withkun withkun closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue
Projects
None yet
Development

No branches or pull requests

3 participants