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

Color Error during uploading of segmentation mask 1.1 #7847

Closed
t0wgster opened this issue May 3, 2024 · 4 comments
Closed

Color Error during uploading of segmentation mask 1.1 #7847

t0wgster opened this issue May 3, 2024 · 4 comments

Comments

@t0wgster
Copy link

t0wgster commented May 3, 2024

Hi everyone,

I'm using CVAT for my master thesis and I am currently encountering a problem during uploading my own segmentation mask 1.1 into CVAT. Due to various reasons, i created my own segmentation masks and want to upload them back into CVAT because I want to edit them.

This is the error code that I encounter:
Could not import dataset to the [project 1](......)
Error: Request failed with status code 500. "datumaro.components.errors.AnnotationImportError: Failed to import item ('images/20230308_111122-111552 SurfaceDefect/004116_20230308_111134.796912', 'default') annotation: Undeclared label '255'\n"..

The class that I'm uploading is depicted as white in my segmentation masks. I already changed its color to white in the labelmap.txt file as well as in the constructor but I'm still encountering the same error.

unnamed

Is there anything else I could try out?

Thanks in advance for your help!

@bsekachev
Copy link
Member

How many classes you have in labelmap?

@t0wgster
Copy link
Author

t0wgster commented May 7, 2024

Thanks for the response, 8 i think, but then i changed it to 10. Do i also have to adjust that in my labelmap file?

Edit: Now i remember that I already adjusted that in my labelmap. So its 10(+background) in my labelmap.

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented May 8, 2024

Hi. The error should indicate that there are some class mask pixels with the value 255, which are not found in the labelmap.txt (assuming the class mask is an indexed 1-channel PNG image).

@t0wgster
Copy link
Author

t0wgster commented May 8, 2024

Hi Max, thanks for responding. Yeah that makes sense, because I was using binary masks (for a good reason). I thought that by converting the numpy array into a .png file, the colors would automatically assume RGB values. I will report whether by changing the masks to a 3-channel image helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants