From c7852c745c63f6e7f1d9358c57221a3e2001c907 Mon Sep 17 00:00:00 2001 From: "kirill.sizov" Date: Mon, 25 Oct 2021 12:45:32 +0300 Subject: [PATCH] Update tests (Datumaro 3D) --- cvat/apps/dataset_manager/tests/test_formats.py | 4 +++- .../dataset_manager/tests/test_rest_api_formats.py | 14 ++++++++------ cvat/apps/engine/tests/test_rest_api.py | 6 ++++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/cvat/apps/dataset_manager/tests/test_formats.py b/cvat/apps/dataset_manager/tests/test_formats.py index 2452cf337b71..22e95e074588 100644 --- a/cvat/apps/dataset_manager/tests/test_formats.py +++ b/cvat/apps/dataset_manager/tests/test_formats.py @@ -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', @@ -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): diff --git a/cvat/apps/dataset_manager/tests/test_rest_api_formats.py b/cvat/apps/dataset_manager/tests/test_rest_api_formats.py index 55d7cb3688b8..a297ac68690e 100644 --- a/cvat/apps/dataset_manager/tests/test_rest_api_formats.py +++ b/cvat/apps/dataset_manager/tests/test_rest_api_formats.py @@ -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 @@ -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 @@ -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) @@ -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") diff --git a/cvat/apps/engine/tests/test_rest_api.py b/cvat/apps/engine/tests/test_rest_api.py index f41a2e35c2b1..6d4769d5bcde 100644 --- a/cvat/apps/engine/tests/test_rest_api.py +++ b/cvat/apps/engine/tests/test_rest_api.py @@ -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"], @@ -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"],