Skip to content

Commit

Permalink
Update tests (Datumaro 3D)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill.sizov committed Oct 25, 2021
1 parent 483adcb commit c7852c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
4 changes: 3 additions & 1 deletion cvat/apps/dataset_manager/tests/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def test_export_formats_query(self):
'CVAT for images 1.1',
'CVAT for video 1.1',
'Datumaro 1.0',
'Datumaro 3D 1.0',
'LabelMe 3.0',
'MOT 1.1',
'MOTS PNG 1.0',
Expand Down Expand Up @@ -322,7 +323,8 @@ def test_import_formats_query(self):
'ICDAR Segmentation 1.0',
'Kitti Raw Format 1.0',
'Sly Point Cloud Format 1.0',
'Datumaro 1.0'
'Datumaro 1.0',
'Datumaro 3D 1.0'
})

def test_exports(self):
Expand Down
14 changes: 8 additions & 6 deletions cvat/apps/dataset_manager/tests/test_rest_api_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ def test_api_v1_dump_and_upload_annotations_with_objects_type_is_shape(self):
# Dump annotations with objects type is shape
for dump_format in dump_formats:
if not dump_format.ENABLED or dump_format.DISPLAY_NAME in [
'Kitti Raw Format 1.0', 'Sly Point Cloud Format 1.0'

'Kitti Raw Format 1.0', 'Sly Point Cloud Format 1.0',
'Datumaro 3D 1.0'
]:
continue
dump_format_name = dump_format.DISPLAY_NAME
Expand Down Expand Up @@ -452,8 +452,8 @@ def test_api_v1_dump_annotations_with_objects_type_is_track(self):
# Dump annotations with objects type is track
for dump_format in dump_formats:
if not dump_format.ENABLED or dump_format.DISPLAY_NAME in [
'Kitti Raw Format 1.0','Sly Point Cloud Format 1.0'

'Kitti Raw Format 1.0','Sly Point Cloud Format 1.0',
'Datumaro 3D 1.0'
]:
continue
dump_format_name = dump_format.DISPLAY_NAME
Expand Down Expand Up @@ -898,7 +898,8 @@ def test_api_v1_rewriting_annotations(self):
if dump_format_name in [
"MOTS PNG 1.0", # issue #2925 and changed points values
'Kitti Raw Format 1.0',
'Sly Point Cloud Format 1.0'
'Sly Point Cloud Format 1.0',
'Datumaro 3D 1.0'
]:
self.skipTest("Format is fail")
images = self._generate_task_images(3)
Expand Down Expand Up @@ -1005,7 +1006,8 @@ def test_api_v1_tasks_annotations_dump_and_upload_with_datumaro(self):
"Segmentation mask 1.1", # changed points values
"ICDAR Segmentation 1.0", # changed points values
'Kitti Raw Format 1.0',
'Sly Point Cloud Format 1.0'
'Sly Point Cloud Format 1.0',
'Datumaro 3D 1.0'
]:
self.skipTest("Format is fail")

Expand Down
6 changes: 4 additions & 2 deletions cvat/apps/engine/tests/test_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4488,7 +4488,8 @@ def _run_api_v1_tasks_id_annotations_dump_load(self, owner, assignee, annotator)
def _get_initial_annotation(annotation_format):
if annotation_format not in ["Market-1501 1.0", "ICDAR Recognition 1.0",
"ICDAR Localization 1.0", "ICDAR Segmentation 1.0",
'Kitti Raw Format 1.0', 'Sly Point Cloud Format 1.0']:
'Kitti Raw Format 1.0', 'Sly Point Cloud Format 1.0',
'Datumaro 3D 1.0']:
rectangle_tracks_with_attrs = [{
"frame": 0,
"label_id": task["labels"][0]["id"],
Expand Down Expand Up @@ -4832,7 +4833,8 @@ def _get_initial_annotation(annotation_format):
],
}]
annotations["tags"] = tags_with_attrs
elif annotation_format in ['Kitti Raw Format 1.0','Sly Point Cloud Format 1.0']:
elif annotation_format in ['Kitti Raw Format 1.0',
'Sly Point Cloud Format 1.0', 'Datumaro 3D 1.0']:
velodyne_wo_attrs = [{
"frame": 0,
"label_id": task["labels"][0]["id"],
Expand Down

0 comments on commit c7852c7

Please sign in to comment.