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

Categories and Mask Colors #23

Open
HolmesJJ opened this issue Apr 12, 2023 · 5 comments
Open

Categories and Mask Colors #23

HolmesJJ opened this issue Apr 12, 2023 · 5 comments

Comments

@HolmesJJ
Copy link

May I please ask where I can find relationship between the categories and the mask colors? I don't find any keywords of category in the code. I would greatly appreciate it if you could provide me with information.

@Wiill007
Copy link

Wiill007 commented Oct 5, 2023

It seems they are all loaded from the checkpoints you're using if you check init_segmentor. What is each class? I don't know at all. However I can tell you each position in checkpoint['meta']['CLASSES'] has a corresponding checkpoint['meta']['PALETTE']. If you print those you can see they are int list for classes and a list of lists of 3 ints for Palette which means basically one color for each class which I guess you already knew. However now at least we know what class number corresponds to each color haha.

Now I'll try to find what is each class wish me luck 😄

@Wiill007
Copy link

Wiill007 commented Oct 5, 2023

So I finally got it you see inside the Food103 dataset you'll find category_id.txt which shows all tags used for the checkpoints provided. From what I have seen all checkpoints have been trained for those 103 tags so now you know what tag, number and color corresponds for each class.

@SamyakR99
Copy link

SamyakR99 commented Jan 8, 2024

Hi @WilsonSmithRobles,

I had a quick follow-up to your previous post,
Where can I find the correspondence between the color palette and the 103 classes in the original dataset (ann_dir folder)?

Thanks!

@Wiill007
Copy link

Wiill007 commented Jan 9, 2024

@SamyakR99 I guess it uses a positional reference being color[0] = annotation[0]. I don't know for sure though.

@SamyakR99
Copy link

@WilsonSmithRobles

I think that should be it. Thanks for the help!

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