MapillaryLabels#
- class rapidtools.data_sources.MapillaryLabels[source]#
Bases:
objectNamespace of official Mapillary segmentation label strings.
Attribute names are upper-snake-case versions of the label with the
--separators replaced by_. Every attribute value is the exact string Mapillary uses in itsdetections.valuefield.Example
Look up a label by constant:
>>> MapillaryLabels.NATURE_SKY 'nature--sky'
Enumerate the complete vocabulary:
>>> labels = [ ... v for k, v in vars(MapillaryLabels).items() ... if not k.startswith('__') and isinstance(v, str) ... ] >>> 'construction--flat--road' in labels True