alexsax / 2D-3D-Semantics

The data skeleton from Joint 2D-3D-Semantic Data for Indoor Scene Understanding
http://3dsemantics.stanford.edu
Apache License 2.0
464 stars 67 forks source link

Semantic Labels #17

Closed hjwdzh closed 5 years ago

hjwdzh commented 5 years ago

May I know how to convert semantic labels from semantic.png in pano folder? These are rgb images, and I am curious about how to map them to unique semantic ids.

alexsax commented 5 years ago

Instructions are in the README.md (and I think they might be in the paper as well):

Semantic: Semantic images come in two variants, semantic and semantic_pretty. They both include information from the point cloud annotations, but only the semantic version should be used for learning. The semantic images have RGB images which are direct 24-bit base-256 integers which contain an index into /assets/semantic_labels.json. Pixels where the data is missing are encoded with the color #0D0D0D which is larger than the len( labels ).

We even provide a function to get_index in https://github.com/alexsax/2D-3D-Semantics/blob/master/assets/utils.py