Open bluesky314 opened 5 years ago
On a follow-up to this question: if I wanted to train on all of the ADE20K classes, should I only need to modify the config file parameter "DATASET: num_class: "? How should I generate a corresponding class value-to-names dictionary and a color encoding?
Hey I am unable to understand how to class values in mask correspond to class names. I want to only use a subset of classes and for that need to know which classes to set as background and which to keep.
I used the encoding function to convert the 3 dimensional mask and got:
As you can see in image, after using encoding function provided I am getting two different class numbers for the class of person while it should be only one. It is not corresponding to colours and numbers given in https://docs.google.com/spreadsheets/d/1se8YEtb2detS7OuPE86fXGyD269pMycAWe2mtKUj2W8/edit?usp=sharing. Person has idx of 14 here.
(I got the encoding function https://github.com/meetshah1995/pytorch-semseg/blob/master/ptsemseg/loader/ade20k_loader.py as encode_segmap)
If I see the masks individually I see
which shows in the first channel humans are not coded the same, in the second and third they share colour code with some background class.
Can anyone please help me figure out how do I figure this out? I want the correct way to get association of class value with class name.