Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangxu-0103 authored Jan 19, 2024
1 parent 2691dd6 commit 2a15565
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mmdet3d/datasets/nuscenes_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,18 @@ def __init__(self,
**kwargs)

def get_seg_label_mapping(self, metainfo: dict) -> np.ndarray:
"""Get segmentation label mapping.
The ``seg_label_mapping`` is an array, its indices are the old label
ids and its values are the new label ids, and is specifically used for
changing point labels in PointSegClassMapping.
Args:
metainfo (dict): Meta information to set seg_label_mapping.
Returns:
np.ndarray: The mapping from old classes to new classes.
"""
seg_label_mapping = np.zeros(metainfo['max_label'] + 1, dtype=np.int64)
for idx in metainfo['seg_label_mapping']:
seg_label_mapping[idx] = metainfo['seg_label_mapping'][idx]
Expand Down

0 comments on commit 2a15565

Please sign in to comment.