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

ExportToCoco() saves category_id as string instead of integer #46

Closed
dnth opened this issue Apr 20, 2022 · 3 comments · Fixed by #47
Closed

ExportToCoco() saves category_id as string instead of integer #46

dnth opened this issue Apr 20, 2022 · 3 comments · Fixed by #47
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@dnth
Copy link
Contributor

dnth commented Apr 20, 2022

I exported my VOC labels into COCO and find that the id and category_id values in the .json file are inconsistent.

In the .jsons file we have "id": 0

"categories": [
        {
            "id": 0,
            "name": "LP",
            "supercategory": null
        }
    ]

But in the annotations I find "category_id": "0"

{
            "image_id": 208,
            "id": 112,
            "segmented": "0",
            "bbox": [
                759.0,
                475.0,
                27.0,
                26.0
            ],
            "area": 702.0,
            "segmentation": null,
            "iscrowd": 0.0,
            "pose": "Unspecified",
            "truncated": "0",
            "category_id": "0",
            "difficult": "0"
        }

I had to manualy change the "category_id": "0" to "category_id": 0 use the annotations and train a model. Is this a bug?

@alexheat alexheat added bug Something isn't working good first issue Good for newcomers labels Apr 21, 2022
@alexheat
Copy link
Contributor

Hi @dnth Diskson, thank you for reporting the issue. You are right, they should be ints. (I am not sure if this issue has always been there or not, but no one else has mentioned it.)

And per our chat, thank you offering to work on the PR yourself to fix the issue. Here are a few tips to help you:

@alexheat
Copy link
Contributor

alexheat commented Apr 24, 2022

This should be fixed in release .37 https://github.com/pylabel-project/pylabel/releases/tag/v0.1.37

@dnth dnth closed this as completed Apr 25, 2022
@dnth
Copy link
Contributor Author

dnth commented Apr 25, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants