MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / LoadAnnotations3D

Class LoadAnnotations3D

embodiedscan/datasets/transforms/loading.py:98–530  ·  view source on GitHub ↗

Load Annotations3D. Load instance mask and semantic mask of points and encapsulate the items into related fields. Required Keys: - ann_info (dict) - gt_bboxes_3d (:obj:`LiDARInstance3DBoxes` | :obj:`DepthInstance3DBoxes` | :obj:`CameraInstance3DBoxes`):

Source from the content-addressed store, hash-verified

96# TODO : refine
97@TRANSFORMS.register_module()
98class LoadAnnotations3D(LoadAnnotations):
99 """Load Annotations3D.
100
101 Load instance mask and semantic mask of points and
102 encapsulate the items into related fields.
103
104 Required Keys:
105
106 - ann_info (dict)
107
108 - gt_bboxes_3d (:obj:`LiDARInstance3DBoxes` |
109 :obj:`DepthInstance3DBoxes` | :obj:`CameraInstance3DBoxes`):
110 3D ground truth bboxes. Only when `with_bbox_3d` is True
111 - gt_labels_3d (np.int64): Labels of ground truths.
112 Only when `with_label_3d` is True.
113 - gt_bboxes (np.float32): 2D ground truth bboxes.
114 Only when `with_bbox` is True.
115 - gt_labels (np.ndarray): Labels of ground truths.
116 Only when `with_label` is True.
117 - depths (np.ndarray): Only when
118 `with_bbox_depth` is True.
119 - centers_2d (np.ndarray): Only when
120 `with_bbox_depth` is True.
121 - attr_labels (np.ndarray): Attribute labels of instances.
122 Only when `with_attr_label` is True.
123
124 - pts_instance_mask_path (str): Path of instance mask file.
125 Only when `with_mask_3d` is True.
126 - pts_semantic_mask_path (str): Path of semantic mask file.
127 Only when `with_seg_3d` is True.
128 - pts_panoptic_mask_path (str): Path of panoptic mask file.
129 Only when both `with_panoptic_3d` is True.
130
131 Added Keys:
132
133 - gt_bboxes_3d (:obj:`LiDARInstance3DBoxes` |
134 :obj:`DepthInstance3DBoxes` | :obj:`CameraInstance3DBoxes`):
135 3D ground truth bboxes. Only when `with_bbox_3d` is True
136 - gt_labels_3d (np.int64): Labels of ground truths.
137 Only when `with_label_3d` is True.
138 - gt_bboxes (np.float32): 2D ground truth bboxes.
139 Only when `with_bbox` is True.
140 - gt_labels (np.int64): Labels of ground truths.
141 Only when `with_label` is True.
142 - depths (np.float32): Only when
143 `with_bbox_depth` is True.
144 - centers_2d (np.ndarray): Only when
145 `with_bbox_depth` is True.
146 - attr_labels (np.int64): Attribute labels of instances.
147 Only when `with_attr_label` is True.
148 - pts_instance_mask (np.int64): Instance mask of each point.
149 Only when `with_mask_3d` is True.
150 - pts_semantic_mask (np.int64): Semantic mask of each point.
151 Only when `with_seg_3d` is True.
152
153 Args:
154 with_bbox_3d (bool): Whether to load 3D boxes. Defaults to True.
155 with_label_3d (bool): Whether to load 3D labels. Defaults to True.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected