Skip to content

Commit

Permalink
renaming yolov8 to ultralytics yolo
Browse files Browse the repository at this point in the history
  • Loading branch information
Eldies committed Dec 24, 2024
1 parent 12f886c commit b866068
Show file tree
Hide file tree
Showing 14 changed files with 145 additions and 131 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ For more information about the supported formats, see:
| [Kitti Raw Format](https://www.cvlibs.net/datasets/kitti/raw_data.php) | ✔️ | ✔️ |
| [LFW](http://vis-www.cs.umass.edu/lfw/) | ✔️ | ✔️ |
| [Supervisely Point Cloud Format](https://docs.supervise.ly/data-organization/00_ann_format_navi) | ✔️ | ✔️ |
| [YOLOv8 Detection](https://docs.ultralytics.com/datasets/detect/) | ✔️ | ✔️ |
| [YOLOv8 Oriented Bounding Boxes](https://docs.ultralytics.com/datasets/obb/) | ✔️ | ✔️ |
| [YOLOv8 Segmentation](https://docs.ultralytics.com/datasets/segment/) | ✔️ | ✔️ |
| [YOLOv8 Pose](https://docs.ultralytics.com/datasets/pose/) | ✔️ | ✔️ |
| [YOLOv8 Classification](https://docs.ultralytics.com/datasets/classify/) | ✔️ | ✔️ |
| [Ultralytics YOLO Detection](https://docs.ultralytics.com/datasets/detect/) | ✔️ | ✔️ |
| [Ultralytics YOLO Oriented Bounding Boxes](https://docs.ultralytics.com/datasets/obb/) | ✔️ | ✔️ |
| [Ultralytics YOLO Segmentation](https://docs.ultralytics.com/datasets/segment/) | ✔️ | ✔️ |
| [Ultralytics YOLO Pose](https://docs.ultralytics.com/datasets/pose/) | ✔️ | ✔️ |
| [Ultralytics YOLO Classification](https://docs.ultralytics.com/datasets/classify/) | ✔️ | ✔️ |

<!--lint enable maximum-line-length-->

Expand Down
60 changes: 30 additions & 30 deletions cvat/apps/dataset_manager/formats/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,53 +77,53 @@ def _import_yolo(*args, **kwargs):
_import_common(*args, format_name="yolo", **kwargs)


@exporter(name='YOLOv8 Detection', ext='ZIP', version='1.0')
def _export_yolov8_detection(*args, **kwargs):
_export_common(*args, format_name='yolov8_detection', **kwargs)
@exporter(name='Ultralytics YOLO Detection', ext='ZIP', version='1.0')
def _export_yolo_ultralytics_detection(*args, **kwargs):
_export_common(*args, format_name='yolo_ultralytics_detection', **kwargs)


@exporter(name='YOLOv8 Oriented Bounding Boxes', ext='ZIP', version='1.0')
def _export_yolov8_oriented_boxes(*args, **kwargs):
_export_common(*args, format_name='yolov8_oriented_boxes', **kwargs)
@exporter(name='Ultralytics YOLO Oriented Bounding Boxes', ext='ZIP', version='1.0')
def _export_yolo_ultralytics_oriented_boxes(*args, **kwargs):
_export_common(*args, format_name='yolo_ultralytics_oriented_boxes', **kwargs)


@exporter(name='YOLOv8 Segmentation', ext='ZIP', version='1.0')
def _export_yolov8_segmentation(dst_file, temp_dir, instance_data, *, save_images=False):
@exporter(name='Ultralytics YOLO Segmentation', ext='ZIP', version='1.0')
def _export_yolo_ultralytics_segmentation(dst_file, temp_dir, instance_data, *, save_images=False):
with GetCVATDataExtractor(instance_data, include_images=save_images) as extractor:
dataset = Dataset.from_extractors(extractor, env=dm_env)
dataset = dataset.transform('masks_to_polygons')
dataset.export(temp_dir, 'yolov8_segmentation', save_images=save_images)
dataset.export(temp_dir, 'yolo_ultralytics_segmentation', save_images=save_images)

make_zip_archive(temp_dir, dst_file)


@exporter(name='YOLOv8 Pose', ext='ZIP', version='1.0')
def _export_yolov8_pose(*args, **kwargs):
_export_common(*args, format_name='yolov8_pose', **kwargs)
@exporter(name='Ultralytics YOLO Pose', ext='ZIP', version='1.0')
def _export_yolo_ultralytics_pose(*args, **kwargs):
_export_common(*args, format_name='yolo_ultralytics_pose', **kwargs)


@exporter(name='YOLOv8 Classification', ext='ZIP', version='1.0')
def _export_yolov8_classification(*args, **kwargs):
_export_common(*args, format_name='yolov8_classification', **kwargs)
@exporter(name='Ultralytics YOLO Classification', ext='ZIP', version='1.0')
def _export_yolo_ultralytics_classification(*args, **kwargs):
_export_common(*args, format_name='yolo_ultralytics_classification', **kwargs)


@importer(name='YOLOv8 Detection', ext="ZIP", version="1.0")
def _import_yolov8_detection(*args, **kwargs):
_import_common(*args, format_name="yolov8_detection", **kwargs)
@importer(name='Ultralytics YOLO Detection', ext="ZIP", version="1.0")
def _import_yolo_ultralytics_detection(*args, **kwargs):
_import_common(*args, format_name="yolo_ultralytics_detection", **kwargs)


@importer(name='YOLOv8 Segmentation', ext="ZIP", version="1.0")
def _import_yolov8_segmentation(*args, **kwargs):
_import_common(*args, format_name="yolov8_segmentation", **kwargs)
@importer(name='Ultralytics YOLO Segmentation', ext="ZIP", version="1.0")
def _import_yolo_ultralytics_segmentation(*args, **kwargs):
_import_common(*args, format_name="yolo_ultralytics_segmentation", **kwargs)


@importer(name='YOLOv8 Oriented Bounding Boxes', ext="ZIP", version="1.0")
def _import_yolov8_oriented_boxes(*args, **kwargs):
_import_common(*args, format_name="yolov8_oriented_boxes", **kwargs)
@importer(name='Ultralytics YOLO Oriented Bounding Boxes', ext="ZIP", version="1.0")
def _import_yolo_ultralytics_oriented_boxes(*args, **kwargs):
_import_common(*args, format_name="yolo_ultralytics_oriented_boxes", **kwargs)


@importer(name='YOLOv8 Pose', ext="ZIP", version="1.0")
def _import_yolov8_pose(src_file, temp_dir, instance_data, **kwargs):
@importer(name='Ultralytics YOLO Pose', ext="ZIP", version="1.0")
def _import_yolo_ultralytics_pose(src_file, temp_dir, instance_data, **kwargs):
with GetCVATDataExtractor(instance_data) as extractor:
point_categories = extractor.categories().get(AnnotationType.points)
label_categories = extractor.categories().get(AnnotationType.label)
Expand All @@ -135,12 +135,12 @@ def _import_yolov8_pose(src_file, temp_dir, instance_data, **kwargs):
src_file,
temp_dir,
instance_data,
format_name="yolov8_pose",
format_name="yolo_ultralytics_pose",
import_kwargs=dict(skeleton_sub_labels=true_skeleton_point_labels),
**kwargs
)


@importer(name='YOLOv8 Classification', ext="ZIP", version="1.0")
def _import_yolov8_classification(*args, **kwargs):
_import_common(*args, format_name="yolov8_classification", **kwargs)
@importer(name='Ultralytics YOLO Classification', ext="ZIP", version="1.0")
def _import_yolo_ultralytics_classification(*args, **kwargs):
_import_common(*args, format_name="yolo_ultralytics_classification", **kwargs)
10 changes: 5 additions & 5 deletions cvat/apps/dataset_manager/tests/assets/annotations.json
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@
],
"tracks": []
},
"YOLOv8 Classification 1.0": {
"Ultralytics YOLO Classification 1.0": {
"version": 0,
"tags": [
{
Expand All @@ -990,7 +990,7 @@
"shapes": [],
"tracks": []
},
"YOLOv8 Detection 1.0": {
"Ultralytics YOLO Detection 1.0": {
"version": 0,
"tags": [],
"shapes": [
Expand All @@ -1008,7 +1008,7 @@
],
"tracks": []
},
"YOLOv8 Oriented Bounding Boxes 1.0": {
"Ultralytics YOLO Oriented Bounding Boxes 1.0": {
"version": 0,
"tags": [],
"shapes": [
Expand All @@ -1027,7 +1027,7 @@
],
"tracks": []
},
"YOLOv8 Segmentation 1.0": {
"Ultralytics YOLO Segmentation 1.0": {
"version": 0,
"tags": [],
"shapes": [
Expand All @@ -1045,7 +1045,7 @@
],
"tracks": []
},
"YOLOv8 Pose 1.0": {
"Ultralytics YOLO Pose 1.0": {
"version": 0,
"tags": [],
"shapes": [
Expand Down
4 changes: 2 additions & 2 deletions cvat/apps/dataset_manager/tests/assets/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@
}
]
},
"YOLOv8 Pose 1.0": {
"name": "YOLOv8 pose task",
"Ultralytics YOLO Pose 1.0": {
"name": "Ultralytics YOLO pose task",
"overlap": 0,
"segment_size": 100,
"labels": [
Expand Down
30 changes: 15 additions & 15 deletions cvat/apps/dataset_manager/tests/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ def test_export_formats_query(self):
'LFW 1.0',
'Cityscapes 1.0',
'Open Images V6 1.0',
'YOLOv8 Classification 1.0',
'YOLOv8 Oriented Bounding Boxes 1.0',
'YOLOv8 Detection 1.0',
'YOLOv8 Pose 1.0',
'YOLOv8 Segmentation 1.0',
'Ultralytics YOLO Classification 1.0',
'Ultralytics YOLO Oriented Bounding Boxes 1.0',
'Ultralytics YOLO Detection 1.0',
'Ultralytics YOLO Pose 1.0',
'Ultralytics YOLO Segmentation 1.0',
})

def test_import_formats_query(self):
Expand Down Expand Up @@ -329,11 +329,11 @@ def test_import_formats_query(self):
'Open Images V6 1.0',
'Datumaro 1.0',
'Datumaro 3D 1.0',
'YOLOv8 Classification 1.0',
'YOLOv8 Oriented Bounding Boxes 1.0',
'YOLOv8 Detection 1.0',
'YOLOv8 Pose 1.0',
'YOLOv8 Segmentation 1.0',
'Ultralytics YOLO Classification 1.0',
'Ultralytics YOLO Oriented Bounding Boxes 1.0',
'Ultralytics YOLO Detection 1.0',
'Ultralytics YOLO Pose 1.0',
'Ultralytics YOLO Segmentation 1.0',
})

def test_exports(self):
Expand Down Expand Up @@ -383,11 +383,11 @@ def test_empty_images_are_exported(self):
# ('KITTI 1.0', 'kitti') format does not support empty annotations
('LFW 1.0', 'lfw'),
# ('Cityscapes 1.0', 'cityscapes'), does not support, empty annotations
('YOLOv8 Classification 1.0', 'yolov8_classification'),
('YOLOv8 Oriented Bounding Boxes 1.0', 'yolov8_oriented_boxes'),
('YOLOv8 Detection 1.0', 'yolov8_detection'),
('YOLOv8 Pose 1.0', 'yolov8_pose'),
('YOLOv8 Segmentation 1.0', 'yolov8_segmentation'),
('Ultralytics YOLO Classification 1.0', 'yolo_ultralytics_classification'),
('Ultralytics YOLO Oriented Bounding Boxes 1.0', 'yyolo_ultralytics_oriented_boxes'),
('Ultralytics YOLO Detection 1.0', 'yolo_ultralytics_detection'),
('Ultralytics YOLO Pose 1.0', 'yolo_ultralytics_pose'),
('Ultralytics YOLO Segmentation 1.0', 'yolo_ultralytics_segmentation'),
]:
with self.subTest(format=format_name):
if not dm.formats.registry.EXPORT_FORMATS[format_name].ENABLED:
Expand Down
24 changes: 12 additions & 12 deletions cvat/apps/dataset_manager/tests/test_rest_api_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
DEFAULT_ATTRIBUTES_FORMATS = [
"VGGFace2 1.0",
"WiderFace 1.0",
"YOLOv8 Classification 1.0",
"Ultralytics YOLO Classification 1.0",
"YOLO 1.1",
"YOLOv8 Detection 1.0",
"YOLOv8 Segmentation 1.0",
"YOLOv8 Oriented Bounding Boxes 1.0",
"YOLOv8 Pose 1.0",
"Ultralytics YOLO Detection 1.0",
"Ultralytics YOLO Segmentation 1.0",
"Ultralytics YOLO Oriented Bounding Boxes 1.0",
"Ultralytics YOLO Pose 1.0",
"PASCAL VOC 1.1",
"Segmentation mask 1.1",
"ImageNet 1.0",
Expand Down Expand Up @@ -411,7 +411,7 @@ def test_api_v2_dump_and_upload_annotations_with_objects_type_is_shape(self):
"Cityscapes 1.0", "COCO Keypoints 1.0",
"ICDAR Localization 1.0", "ICDAR Recognition 1.0",
"ICDAR Segmentation 1.0", "Market-1501 1.0", "MOT 1.1",
"YOLOv8 Pose 1.0",
"Ultralytics YOLO Pose 1.0",
]:
task = self._create_task(tasks[dump_format_name], images)
else:
Expand Down Expand Up @@ -469,7 +469,7 @@ def test_api_v2_dump_and_upload_annotations_with_objects_type_is_shape(self):
"Cityscapes 1.0", "COCO Keypoints 1.0",
"ICDAR Localization 1.0", "ICDAR Recognition 1.0",
"ICDAR Segmentation 1.0", "Market-1501 1.0", "MOT 1.1",
"YOLOv8 Pose 1.0",
"Ultralytics YOLO Pose 1.0",
]:
task = self._create_task(tasks[upload_format_name], images)
else:
Expand Down Expand Up @@ -513,7 +513,7 @@ def test_api_v2_dump_annotations_with_objects_type_is_track(self):
"Cityscapes 1.0", "COCO Keypoints 1.0",
"ICDAR Localization 1.0", "ICDAR Recognition 1.0",
"ICDAR Segmentation 1.0", "Market-1501 1.0", "MOT 1.1",
"YOLOv8 Pose 1.0",
"Ultralytics YOLO Pose 1.0",
]:
task = self._create_task(tasks[dump_format_name], video)
else:
Expand Down Expand Up @@ -569,7 +569,7 @@ def test_api_v2_dump_annotations_with_objects_type_is_track(self):
"Cityscapes 1.0", "COCO Keypoints 1.0",
"ICDAR Localization 1.0", "ICDAR Recognition 1.0",
"ICDAR Segmentation 1.0", "Market-1501 1.0", "MOT 1.1",
"YOLOv8 Pose 1.0",
"Ultralytics YOLO Pose 1.0",
]:
task = self._create_task(tasks[upload_format_name], video)
else:
Expand Down Expand Up @@ -846,7 +846,7 @@ def test_api_v2_export_dataset(self):
"Cityscapes 1.0", "COCO Keypoints 1.0",
"ICDAR Localization 1.0", "ICDAR Recognition 1.0",
"ICDAR Segmentation 1.0", "Market-1501 1.0", "MOT 1.1",
"YOLOv8 Pose 1.0",
"Ultralytics YOLO Pose 1.0",
]:
task = self._create_task(tasks[dump_format_name], images)
else:
Expand Down Expand Up @@ -947,7 +947,7 @@ def test_api_v2_rewriting_annotations(self):
if dump_format_name in [
"Market-1501 1.0",
"ICDAR Localization 1.0", "ICDAR Recognition 1.0",
"ICDAR Segmentation 1.0", "COCO Keypoints 1.0", "YOLOv8 Pose 1.0",
"ICDAR Segmentation 1.0", "COCO Keypoints 1.0", "Ultralytics YOLO Pose 1.0",
]:
task = self._create_task(tasks[dump_format_name], images)
else:
Expand Down Expand Up @@ -1058,7 +1058,7 @@ def test_api_v2_tasks_annotations_dump_and_upload_with_datumaro(self):
"Market-1501 1.0", "Cityscapes 1.0",
"ICDAR Localization 1.0", "ICDAR Recognition 1.0",
"ICDAR Segmentation 1.0", "COCO Keypoints 1.0",
"YOLOv8 Pose 1.0",
"Ultralytics YOLO Pose 1.0",
]:
task = self._create_task(tasks[dump_format_name], images)
else:
Expand Down
11 changes: 7 additions & 4 deletions cvat/apps/engine/tests/test_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6127,13 +6127,13 @@ def _get_initial_annotation(annotation_format):
elif annotation_format == "YOLO 1.1":
annotations["shapes"] = rectangle_shapes_wo_attrs

elif annotation_format == "YOLOv8 Detection 1.0":
elif annotation_format == "Ultralytics YOLO Detection 1.0":
annotations["shapes"] = rectangle_shapes_wo_attrs

elif annotation_format == "YOLOv8 Oriented Bounding Boxes 1.0":
elif annotation_format == "Ultralytics YOLO Oriented Bounding Boxes 1.0":
annotations["shapes"] = rectangle_shapes_wo_attrs

elif annotation_format == "YOLOv8 Segmentation 1.0":
elif annotation_format == "Ultralytics YOLO Segmentation 1.0":
annotations["shapes"] = polygon_shapes_wo_attrs

elif annotation_format == "COCO 1.0":
Expand Down Expand Up @@ -6493,7 +6493,10 @@ def etree_to_dict(t):
self.assertEqual(meta["task"]["name"], task["name"])
elif format_name == "PASCAL VOC 1.1":
self.assertTrue(zipfile.is_zipfile(content))
elif format_name in ["YOLO 1.1", "YOLOv8 Detection 1.0", "YOLOv8 Segmentation 1.0", "YOLOv8 Oriented Bounding Boxes 1.0", "YOLOv8 Pose 1.0"]:
elif format_name in [
"YOLO 1.1", "Ultralytics YOLO Detection 1.0", "Ultralytics YOLO Segmentation 1.0",
"Ultralytics YOLO Oriented Bounding Boxes 1.0", "Ultralytics YOLO Pose 1.0",
]:
self.assertTrue(zipfile.is_zipfile(content))
elif format_name in ['Kitti Raw Format 1.0','Sly Point Cloud Format 1.0']:
self.assertTrue(zipfile.is_zipfile(content))
Expand Down
2 changes: 1 addition & 1 deletion cvat/requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ azure-storage-blob==12.13.0
boto3==1.17.61
clickhouse-connect==0.6.8
coreapi==2.3.3
datumaro @ git+https://github.com/cvat-ai/datumaro.git@bf0374689df50599a34a4f220b9e5329aca695ce
datumaro @ git+https://github.com/cvat-ai/datumaro.git@f55ccf92f7d61d7dad276dd0007fc4aeed72e0bb
dj-pagination==2.5.0
# Despite direct indication allauth in requirements we should keep 'with_social' for dj-rest-auth
# to avoid possible further versions conflicts (we use registration functionality)
Expand Down
2 changes: 1 addition & 1 deletion cvat/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cryptography==44.0.0
# pyjwt
cycler==0.12.1
# via matplotlib
datumaro @ git+https://github.com/cvat-ai/datumaro.git@bf0374689df50599a34a4f220b9e5329aca695ce
datumaro @ git+https://github.com/cvat-ai/datumaro.git@f55ccf92f7d61d7dad276dd0007fc4aeed72e0bb
# via -r cvat/requirements/base.in
defusedxml==0.7.1
# via
Expand Down
Loading

0 comments on commit b866068

Please sign in to comment.