Skip to content

Commit

Permalink
feat: add ability to load autolabels (#80)
Browse files Browse the repository at this point in the history
* feat: add ability to load autolabels

* fix: pr updates
  • Loading branch information
chrisochoatri authored May 4, 2022
1 parent 6201e77 commit de57b01
Show file tree
Hide file tree
Showing 6 changed files with 463 additions and 22 deletions.
5 changes: 4 additions & 1 deletion dgp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
CLASSIFICATION_FOLDER = "classification"

# Scene Directory structure constants
AUTOLABEL_FOLDER = 'autolabels'
CALIBRATION_FOLDER = 'calibration'
ONTOLOGY_FOLDER = 'ontology'
SCENE_JSON_FILENAME = 'scene.json'
Expand All @@ -47,3 +46,7 @@
ANNOTATION_FILE_NAME = '{image_content_hash}_{annotation_content_hash}.json'
TRI_DGP_AGENTS_JSON_NAME = "agents_{agent_hash}.json"
TRI_DGP_AGENTS_SLICES_JSON_NAME = "agents_slices_{slice_hash}.json"

# Autolabel constants
AUTOLABEL_FOLDER = 'autolabels'
AUTOLABEL_SCENE_JSON_NAME = 'scene.json'
2 changes: 1 addition & 1 deletion dgp/annotations/depth_annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def save(self, save_dir):
Full path to the output NPZ file.
"""
pointcloud_path = os.path.join(save_dir, '{}.npz'.format(self.hexdigest))
np.savez_compressed(pointcloud_path, self.depth)
np.savez_compressed(pointcloud_path, data=self.depth)
return pointcloud_path

def render(self):
Expand Down
Loading

0 comments on commit de57b01

Please sign in to comment.