spdl.source.imagenet.get_mappings¶
- get_mappings() dict[str, int] [source]¶
Get the mapping from WordNet ID to class and label.
1000 IDs from ILSVRC2012 is used. The class indices are the index of sorted WordNet ID, which corresponds to most models publicly available.
- Returns:
Mapping from WordNet ID to class index.
Example
>>> class_mapping = get_mappings() >>> print(class_mapping["n03709823"]) 636