diff --git a/cvat/apps/dataset_manager/formats/mot.py b/cvat/apps/dataset_manager/formats/mot.py index f9e7a02c4cf8..1efb9b578c6c 100644 --- a/cvat/apps/dataset_manager/formats/mot.py +++ b/cvat/apps/dataset_manager/formats/mot.py @@ -45,6 +45,17 @@ def _import(src_file, task_data): track_id = ann.attributes.get('track_id') if track_id is None: + # Extension. Import regular boxes: + task_data.add_shape(task_data.LabeledShape( + type='rectangle', + label=label_cat.items[ann.label].name, + points=ann.points, + occluded=ann.attributes.get('occluded') == True, + z_order=ann.z_order, + group=0, + frame=frame_number, + attributes=[], + )) continue shape = task_data.TrackedShape( diff --git a/cvat/apps/engine/tests/_test_rest_api.py b/cvat/apps/engine/tests/_test_rest_api.py index fcd3d59a1d7f..aa9e0e77341d 100644 --- a/cvat/apps/engine/tests/_test_rest_api.py +++ b/cvat/apps/engine/tests/_test_rest_api.py @@ -3119,6 +3119,7 @@ def _get_initial_annotation(annotation_format): annotations["tracks"] = rectangle_tracks_wo_attrs elif annotation_format == "MOT 1.1": + annotations["shapes"] = rectangle_shapes_wo_attrs annotations["tracks"] = rectangle_tracks_wo_attrs elif annotation_format == "LabelMe 3.0":