-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renaming yolov8 to yolo ultralytics #68
Conversation
WalkthroughThe pull request introduces a comprehensive rebranding and renaming of the YOLOv8 format to "Ultralytics YOLO" across multiple files in the Datumaro project. This involves updating class names, format identifiers, documentation, and test cases to reflect the new naming convention. The changes primarily focus on standardizing terminology while maintaining the existing functionality of dataset handling, importing, exporting, and conversion for various YOLO annotation types. Changes
Sequence DiagramsequenceDiagram
participant User
participant DatumaroProject
participant YoloUltralyticsFormat
User->>DatumaroProject: Import dataset
DatumaroProject->>YoloUltralyticsFormat: Detect format
YoloUltralyticsFormat-->>DatumaroProject: Format identified
DatumaroProject->>User: Dataset loaded successfully
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (8)
datumaro/plugins/yolo_format/extractor.py (3)
503-503
: Add clarifying docstring
To differentiate oriented boxes logic from standard bounding boxes, a brief docstring could aid maintainability.
710-710
: Preempt missing file
Whenimage_list_path
is missing, consider handling or logging the scenario explicitly rather than silently skipping.
722-722
: Avoid repeated file-handling logic
Fetching label file paths is repeated. A small shared helper could reduce duplication.site/content/en/docs/formats/yolo_ultralytics_classification.md (4)
17-17
: Grammar nitpick: Consider using “an ImageNet dataset.”
To improve readability:-## Import Ultralytics YOLO classification dataset +A Datumaro project with an ImageNet dataset can be created...
35-35
: Grammar improvement suggestion: missing article or punctuation.
Consider:-For successful importing of Ultralytics YOLO Classification dataset the input directory... +For successful importing of an Ultralytics YOLO Classification dataset, the input directory...🧰 Tools
🪛 LanguageTool
[uncategorized] ~35-~35: You might be missing the article “the” here.
Context: ...tion') ``` For successful importing of Ultralytics YOLO Classification dataset the input d...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~35-~35: A comma might be missing here.
Context: ...ting of Ultralytics YOLO Classification dataset the input directory with dataset should...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
73-73
: Grammar suggestion: “... dataset using the Python API”.
Consider including “the” for smoother reading.🧰 Tools
🪛 LanguageTool
[uncategorized] ~73-~73: You might be missing the article “the” here.
Context: ...ytics YOLO Classification dataset using Python API ```python import datumaro as dm d...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
88-89
: Stylistic improvement: add a comma before 'and'.
Rewrite for clarity:-If your dataset contains `Label` for images and you want to convert this... +If your dataset contains `Label` for images, and you want to convert this...🧰 Tools
🪛 LanguageTool
[uncategorized] ~88-~88: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...your dataset containsLabel
for images and you want to convert this dataset into t...(COMMA_COMPOUND_SENTENCE)
site/content/en/docs/formats/yolo_ultralytics.md (1)
185-187
: Grammar fix: “an Ultralytics YOLO dataset.”
To align with standard usage:-Datumaro can convert a Ultralytics YOLO dataset into any other format... +Datumaro can convert an Ultralytics YOLO dataset into any other format...🧰 Tools
🪛 LanguageTool
[misspelling] ~185-~185: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ... to other formats Datumaro can convert a Ultralytics YOLO dataset into any other...(EN_A_VS_AN)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (12)
tests/assets/yolo_dataset/yolo_ultralytics_classification/train/label_0/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_classification/train/label_0/2.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_classification/train/label_1/3.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_detection/images/train/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_detection_reversed_folders/train/images/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_detection_with_list_of_imgs/images/train/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_detection_with_list_of_names/images/train/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_detection_with_subset_txt/images/train/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_oriented_boxes/images/train/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_pose/images/train/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_pose_two_values_per_point/images/train/1.jpg
is excluded by!**/*.jpg
tests/assets/yolo_dataset/yolo_ultralytics_segmentation/images/train/1.jpg
is excluded by!**/*.jpg
📒 Files selected for processing (10)
CHANGELOG.md
(1 hunks)datumaro/plugins/yolo_format/converter.py
(10 hunks)datumaro/plugins/yolo_format/extractor.py
(12 hunks)datumaro/plugins/yolo_format/format.py
(2 hunks)datumaro/plugins/yolo_format/importer.py
(6 hunks)site/content/en/docs/formats/yolo_ultralytics.md
(11 hunks)site/content/en/docs/formats/yolo_ultralytics_classification.md
(4 hunks)site/content/en/docs/user-manual/supported_formats.md
(1 hunks)tests/integration/cli/test_yolo_format.py
(1 hunks)tests/unit/data_formats/test_yolo_format.py
(21 hunks)
🧰 Additional context used
🪛 LanguageTool
site/content/en/docs/formats/yolo_ultralytics_classification.md
[uncategorized] ~19-~19: Use the indefinite article “an” before nouns that start with a vowel sound.
Context: ...cation dataset A Datumaro project with a ImageNet dataset can be created in the ...
(AI_EN_LECTOR_REPLACEMENT_DETERMINER_A_AN)
[uncategorized] ~35-~35: You might be missing the article “the” here.
Context: ...tion') ``` For successful importing of Ultralytics YOLO Classification dataset the input d...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~35-~35: A comma might be missing here.
Context: ...ting of Ultralytics YOLO Classification dataset the input directory with dataset should...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~73-~73: You might be missing the article “the” here.
Context: ...ytics YOLO Classification dataset using Python API ```python import datumaro as dm d...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~88-~88: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...your dataset contains Label
for images and you want to convert this dataset into t...
(COMMA_COMPOUND_SENTENCE)
site/content/en/docs/formats/yolo_ultralytics.md
[misspelling] ~36-~36: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...taset To create a Datumaro project with a Ultralytics YOLO source, use the follow...
(EN_A_VS_AN)
[misspelling] ~185-~185: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ... to other formats Datumaro can convert a Ultralytics YOLO dataset into any other...
(EN_A_VS_AN)
🔇 Additional comments (100)
datumaro/plugins/yolo_format/extractor.py (9)
48-53
: Use the new imports consistently
All references to YOLOv8*
were replaced with YoloUltralytics*
. The consistency appears sound.
353-354
: Stable class hierarchy
Renaming to YoloUltralyticsDetectionExtractor
reflects the updated naming and preserves inheritance from YoloExtractor
.
425-438
: Validate indexing
The condition len(split_rel_path) < 3
properly prevents out-of-range access at split_rel_path[2]
. This check is critical to avoid runtime errors.
476-476
: Check segmentation specialization
Inheriting from YoloUltralyticsDetectionExtractor
suggests some shared logic. Confirm that segmentation aspects are fully covered or overridden where needed.
536-536
: Pose extractor rename
Migration to YoloUltralyticsPoseExtractor
aligns with the new naming scheme; no issues found.
548-565
: Well-defined shape checks
The code thoroughly validates _config
fields, providing clear, targeted error messages.
700-700
: Classification extractor
Renaming continues to be consistent with the Ultralytics style.
751-751
: Filtering 'no_label'
Excluding items labeled IMAGE_DIR_NO_LABEL
is a neat solution.
767-767
: Ignore no_label folder
In line with the logic for unlabeled images—this is consistent with the rest of the classification extractor.
tests/unit/data_formats/test_yolo_format.py (25)
44-48
: Renamed converter imports
All YOLOv8 converter imports now point to YoloUltralytics*Converter
, which is consistent with the rest of the rename effort.
52-56
: Extractor imports
References to YoloUltralytics*Extractor
confirm a unified naming scheme.
60-64
: Importer imports
Likewise, we see updated import references for YoloUltralytics importers. This is consistent.
423-425
: Detection converter test
YoloUltralyticsDetectionConverterTest
lines up with the new class name in the converter.
574-576
: Segmentation converter test
Renaming from YOLOv8 to YoloUltralyticsSegmentationConverterTest
is straightforward and consistent.
589-593
: Oriented boxes converter test
This rename aligns oriented boxes testing with the new “Ultralytics” nomenclature.
621-623
: Pose converter test
Matches YoloUltralyticsPoseConverter
—the logic remains.
911-913
: Classification converter test
Shift to YoloUltralyticsClassificationConverterTest
is in sync with the new naming.
1147-1154
: Detection importer test
The rename references additional test assets for the new YoloUltralyticsDetectionImporter
.
1162-1164
: Detect multiple YoloUltralytics formats
Approach to detect all relevant YoloUltralytics importers checks out.
1227-1227
: Flow gating
Ensures correct importer is used when self.IMPORTER.NAME
equals YoloUltralyticsDetectionImporter.NAME
.
1246-1248
: Config rewriting
Allows testing additional config scenarios by modifying default YAML. Implementation is valid.
1263-1266
: Segmentation importer test
Renamed test class aligns with YoloUltralyticsSegmentationImporter
.
1287-1291
: Oriented boxes importer test
Adopts the new oriented boxes naming for the importer test. Looks fine.
1311-1315
: Pose importer test
Consistent rename matching YoloUltralyticsPoseImporter
.
1370-1372
: Classification importer test
References YoloUltralyticsClassificationImporter
, completing the rename set.
1375-1375
: Dataset path update
Points to yolo_ultralytics_classification
assets for testing.
1420-1422
: Simulate EXIF rotation
No logic concerns seen—copying and rewriting the image is correct for testing rotation.
1563-1565
: Detection extractor test
Renamed block references the new YoloUltralyticsDetectionExtractorTest
.
1585-1585
: Explicit pass
Skipping the inherited test step is intentional here.
1598-1600
: Segmentation extractor test
Rename is complete. The logic corresponds to segmentation features.
1627-1629
: Oriented boxes extractor test
Maintains test coverage under the new naming convention.
1663-1665
: Pose extractor test
Renamed into the new YoloUltralytics standard. Everything else looks good.
1859-1859
: Classification extractor test
Renaming retains classification coverage as expected.
1873-1874
: Exporter reference
Proper rename ensures the correct format references in the export logic.
datumaro/plugins/yolo_format/format.py (3)
15-15
: YoloUltralyticsPath
Adds extra reserved config fields and retains .yaml
extension for config. This is consistent with the new naming.
27-27
: YoloUltralyticsPoseFormat
Declares KPT_SHAPE_FIELD_NAME
for pose data. Straight rename from YOLOv8.
31-31
: YoloUltralyticsClassificationFormat
The rename ensures a clear distinction for classification tasks.
datumaro/plugins/yolo_format/importer.py (13)
17-21
: Refined extractor imports
Switching from YOLOv8 to YoloUltralytics references fosters consistency across extractors.
23-23
: Import format references
YoloUltralyticsPath
and YoloUltralyticsPoseFormat
are properly introduced for the new code.
36-37
: Detection importer
Binds EXTRACTOR = YoloUltralyticsDetectionExtractor
. Naming is aligned with detection logic.
52-52
: Reject pose fields
Rejecting kpt_shape
in detection config avoids confusion between detection and pose formats.
63-63
: Ensure single config
Fails detection if multiple or no valid .yaml
files. This is a robust approach.
75-75
: Scan for YAML
Applying _find_sources_recursive
up to max_depth=1
helps avoid deep nesting conflicts.
85-85
: Default config fallback
Prioritizing DEFAULT_CONFIG_FILE
if multiple .yaml
are found. Logical design choice.
89-90
: Segmentation importer
Renamed to adopt YoloUltralyticsSegmentationExtractor
. Minimal change, purely naming.
93-94
: Oriented boxes importer
Switched to YoloUltralyticsOrientedBoxesExtractor
. Straight rename.
97-98
: Pose importer
References YoloUltralyticsPoseExtractor
, aligned with the updated naming convention.
104-108
: Pose-specific kpt_shape
check
Requiring kpt_shape
ensures the config is truly pose-based. Good separation of concerns.
114-114
: Classification importer
YoloUltralyticsClassificationImporter
replaces YOLOv8 classification. Proper rename.
123-123
: Single classification format source
Listing one classification source referencing the correct extractor for classification tasks.
tests/integration/cli/test_yolo_format.py (1)
223-225
: Integration scenario rename
YoloUltralyticsIntegrationScenarios
now points to yolo_ultralytics_detection
, confirming the naming shift from YOLOv8.
datumaro/plugins/yolo_format/converter.py (12)
35-35
: No issues with the newly imported modules.
All the rebranded imports match the newly introduced classes or constants and appear consistent with the broader naming convention changes.
281-282
: Renaming to YoloUltralyticsDetectionConverter
is consistent and clear.
This change aligns the class name with the new "Ultralytics" naming convention.
294-294
: Fallback to YoloUltralyticsPath.DEFAULT_CONFIG_FILE
is appropriate.
The assignment ensures a sensible default if config_file
is not provided.
305-305
: Updated default config-file reference is accurate.
Propagating the path constant from YoloUltralyticsPath
maintains consistency.
329-329
: Refined _make_image_subset_folder
for YoloUltralytics.
Clear and consistent usage of YoloUltralyticsPath.IMAGES_FOLDER_NAME
.
333-333
: Refined _make_annotation_subset_folder
for YoloUltralytics.
This change aligns with the renamed labels directory requirement.
336-336
: Inheriting from YoloUltralyticsDetectionConverter
.
Using the detection converter as a base for segmentation is a solid approach to avoid code duplication.
345-345
: YoloUltralyticsOrientedBoxesConverter
is consistent with new naming.
No functional issues identified.
355-355
: YoloUltralyticsPoseConverter
class rename is consistent.
Changes maintain clarity for pose-specific functionality.
406-406
: YoloUltralyticsClassificationConverter
introduced as a separate class.
Ensures classification logic is isolated from detection-based converters.
441-441
: IMAGE_DIR_NO_LABEL
usage is consistent with classification structure.
Provides a fallback for unlabeled images.
453-453
: YoloUltralyticsClassificationFormat.LABELS_FILE
reference is valid.
Aligns the labels file name with the new classification convention.
site/content/en/docs/formats/yolo_ultralytics_classification.md (11)
2-3
: Successful renaming of title and linkTitle.
Reflects the new "Ultralytics YOLO Classification" branding throughout the docs.
24-24
: Command usage is correct for importing.
No issues found; rebranded format name is aligned with the rest of the changes.
27-27
: Clarity on loading through Python API is good.
No major issues noted; consistent usage of yolo_ultralytics_classification
.
32-32
: Example code snippet is valid.
Demonstrates the correct import procedure with the new format name.
55-55
: Export heading is clear and consistent.
Uses "Ultralytics YOLO Classification" effectively.
64-64
: Datuming conversion command is consistent.
No issue; references the correct format string.
69-69
: Importing once again, consistent usage.
No new concerns.
78-78
: Sample code snippet for Python loading is valid.
Applies the new format name properly.
86-86
: Heading clarifies exporting to Ultralytics YOLO Classification format.
No concerns found.
94-94
: The export command is properly rebranded.
No issues noted.
99-99
: Consistent usage of command-line for final export.
All references match the new format identifier.
site/content/en/docs/formats/yolo_ultralytics.md (19)
2-3
: Title and linkTitle updates are accurate.
Reflects the change to "Ultralytics YOLO."
9-10
: Ultralytics YOLO format family description is thorough.
No issues; ensures clarity on sub-formats.
35-36
: Import section references the new commands for each sub-format.
Commands seem consistent with the rebranded format names.
🧰 Tools
🪛 LanguageTool
[misspelling] ~36-~36: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...taset To create a Datumaro project with a Ultralytics YOLO source, use the follow...
(EN_A_VS_AN)
40-43
: Explicit examples for detection, oriented boxes, segmentation, and pose.
Clear and user-friendly references.
46-46
: Dataset structure outline is well-defined.
No issues; accurately describes the new YOLO structure.
86-86
: Pose-specific field kpt_shape
usage is explained.
No issues found; documentation is thorough.
101-101
: Support for arbitrary data.yaml
filenames is a helpful detail.
Good improvement for user flexibility.
191-191
: Proper add command for detection.
References updated format, no issues found.
196-196
: Converting to coco_instances
from Ultralytics YOLO.
Straightforward example, well-aligned with naming changes.
199-199
: Extra options provide clarity.
No concerns; good documentation of optional arguments.
208-208
: Python API usage: consistent format string.
Clear and helpful example for users.
214-215
: Export to Ultralytics YOLO format heading clarifies usage.
No issues found; consistent with the rest of the doc changes.
223-223
: Export command specifying new format name.
Good demonstration for "yolo_ultralytics_detection."
226-226
: Export options documented well.
Covers all relevant flags for advanced usage.
237-237
: Example 1 thoroughly demonstrates creating detection format.
Renamed output directory is consistent with brand changes.
257-257
: Example 1 export path matches the new naming.
No functional concerns.
283-283
: Example 2 export path for oriented boxes is accurate.
No issues; consistent usage of the new format.
305-305
: Example 3 consistent usage of the segmentation format.
No problems identified.
344-344
: Example 4 consistent usage of the pose format.
Renamed path aligns with "ultralytics" references.
site/content/en/docs/user-manual/supported_formats.md (6)
164-164
: Adding “YOLO Ultralytics” with expanded annotation types.
Now includes classification
variation as well.
168-168
: Documentation link references the new format doc.
Matches the rebranded naming convention.
172-172
: Maintaining consistent doc link for segmentation.
No issues identified.
176-176
: Doc link for pose remains consistent.
Again, aligns with the new naming standard.
180-180
: Doc link for oriented boxes is valid.
No concerns; user can easily find relevant docs.
183-184
: Classification subsection references new example and docs.
The path and link are updated to “yolo_ultralytics_classification.”
CHANGELOG.md (1)
48-50
: LGTM! The changelog entries accurately reflect the YOLOv8 rebranding.
The entries properly document the addition of Ultralytics YOLO format support and include the relevant PR references.
<!-- Raise an issue to propose your change (https://github.com/cvat-ai/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> depends on cvat-ai/datumaro#68 ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I submit my changes into the `develop` branch - [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) - [ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning)) ### License - [ ] I submit _my code changes_ under the same [MIT License]( https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Updated documentation to reflect support for Ultralytics YOLO formats, including Detection, Segmentation, Pose, Oriented Bounding Boxes, and Classification. - Added new format entries in the documentation for Ultralytics YOLO. - **Bug Fixes** - Corrected naming conventions in tests and annotations from YOLOv8 to Ultralytics YOLO. - **Documentation** - Enhanced clarity and consistency in documentation regarding Ultralytics YOLO formats. - Reformatted tables and sections to improve readability. - **Chores** - Updated dependencies to the latest version of the `datumaro` package. - Adjusted Docker configurations to map local directories for improved access. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
How to test
Checklist
develop
branchLicense
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
New Features
PointCloud
media type.describe-downloads
command for dataset information.detect-dataset
CLI command with maximum recursion depth parameter.Bug Fixes
Documentation
Refactor
Tests