isl-org / DPT

Dense Prediction Transformers
MIT License
1.99k stars 258 forks source link

Any workaround to get the full labels-mapping list? #91

Closed lucianoambrosini closed 4 months ago

lucianoambrosini commented 4 months ago

Hello, thank you for your interesting work/research,

I was wondering how to get the entire labels list and the mapping list too from the segmentation process. I have used this model dpt_hybrid-ade20k-53898607.pt and I got this list after processing an image:

initialize device: cuda start processing processing D:/Desktop/DPT/SemSeg/ref_images\ImageRef_01.jpg (1/1)

Labels list: Label: 1 Label: 2 Label: 3 Label: 5 Label: 7 Label: 10 Label: 12 Label: 18 Label: 21 Label: 33 Label: 94

I'm struggling to categorize these numbers. it would be great to know, for instance, that; 1=trees, 7=cars, etc. I hope you can assist me in clarifying this matter.

Thank you in advance!

lucianoambrosini commented 4 months ago

Solved