Skip to content
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 ultralytics yolo #8863

Merged
merged 12 commits into from
Dec 26, 2024
Merged

renaming yolov8 to ultralytics yolo #8863

merged 12 commits into from
Dec 26, 2024

Conversation

Eldies
Copy link
Contributor

@Eldies Eldies commented Dec 24, 2024

Motivation and context

depends on cvat-ai/datumaro#68

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

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.

Copy link
Contributor

coderabbitai bot commented Dec 24, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request introduces a comprehensive rebranding of YOLOv8 annotation formats to Ultralytics YOLO formats across multiple files in the Computer Vision Annotation Tool (CVAT). The changes involve renaming various annotation format references, updating documentation, modifying test cases, and adjusting dependencies. The modifications ensure consistent terminology and alignment with the latest naming conventions for YOLO formats.

Changes

File Change Summary
README.md Updated YOLO annotation format entries from YOLOv8 to Ultralytics YOLO
cvat/apps/dataset_manager/formats/yolo.py Renamed export and import functions for YOLO formats
cvat/apps/dataset_manager/tests/assets/annotations.json Updated category names from YOLOv8 to Ultralytics YOLO
cvat/requirements/base.in & base.txt Updated Datumaro package commit reference
docker-compose.dev.yml Added volume mappings for Datumaro
Documentation files Rebranded YOLOv8 references to Ultralytics YOLO across multiple markdown files
Test files Updated format names in various test cases

Poem

🐰 A Rabbit's Ode to YOLO's New Name 🥕

From YOLOv8 to Ultralytics bright,
Our annotation tool takes flight!
Renaming formats with bunny glee,
Precision and style, now we can see!
A hop, a skip, a naming delight! 🚀


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (6)
cvat/apps/dataset_manager/tests/test_formats.py (3)

Line range hint 414-414: Ultralytics YOLO Pose condition.
Line 414 includes a condition checking for 'Ultralytics YOLO Pose 1.0'. Ensure the correct dimension (2D or otherwise) is tested for pose tasks.


Line range hint 472-472: Import condition for Pose.
Similar logic. Ensuring consistent dimension checks or specialized attribute checks for pose data is recommended.


Line range hint 849-849: Video dimension checks for Pose.
Same pattern of dimension checks. If future expansions are planned (e.g., 3D data), consider an extended format check here.

docker-compose.dev.yml (1)

32-33: Consider making Python version configurable and reducing duplication.

The volume mappings have two potential issues:

  1. The Python version (3.10) is hardcoded in the path, which could break if the Python version changes.
  2. The same volume mapping is repeated across multiple services.

Consider these improvements:

  1. Make Python version configurable:
- - ../datumaro/datumaro:/opt/venv/lib/python3.10/site-packages/datumaro
+ - ../datumaro/datumaro:/opt/venv/lib/python${PYTHON_VERSION}/site-packages/datumaro
  1. Use YAML anchors to reduce duplication:
x-datumaro-volume: &datumaro-volume
  - ../datumaro/datumaro:/opt/venv/lib/python${PYTHON_VERSION}/site-packages/datumaro

services:
  cvat_server:
    volumes:
      - *datumaro-volume
  cvat_worker_export:
    volumes:
      - *datumaro-volume
  # ... other services

Also applies to: 46-47, 60-61

site/content/en/docs/manual/advanced/formats/format-yolo-ultralytics.md (1)

130-139: Enhance the import section with more details.

The import section could benefit from additional information about:

  • Required file naming conventions
  • Supported annotation formats for each type (Detection, Segmentation, etc.)
  • Validation rules for the annotations
site/content/en/docs/manual/advanced/formats/_index.md (1)

49-53: Consider expanding the models column for Ultralytics YOLO formats.

The models column for Ultralytics YOLO formats only mentions YOLOv8. Consider listing other compatible models or frameworks that can work with these formats to provide users with more options.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12f886c and 8a76a6d.

📒 Files selected for processing (15)
  • README.md (1 hunks)
  • cvat/apps/dataset_manager/formats/yolo.py (2 hunks)
  • cvat/apps/dataset_manager/tests/assets/annotations.json (5 hunks)
  • cvat/apps/dataset_manager/tests/assets/tasks.json (1 hunks)
  • cvat/apps/dataset_manager/tests/test_formats.py (3 hunks)
  • cvat/apps/dataset_manager/tests/test_rest_api_formats.py (8 hunks)
  • cvat/apps/engine/tests/test_rest_api.py (2 hunks)
  • cvat/requirements/base.in (1 hunks)
  • cvat/requirements/base.txt (1 hunks)
  • docker-compose.dev.yml (3 hunks)
  • site/content/en/docs/manual/advanced/formats/_index.md (1 hunks)
  • site/content/en/docs/manual/advanced/formats/format-yolo-ultralytics-classification.md (1 hunks)
  • site/content/en/docs/manual/advanced/formats/format-yolo-ultralytics.md (4 hunks)
  • tests/python/rest_api/test_projects.py (2 hunks)
  • tests/python/rest_api/test_tasks.py (2 hunks)
✅ Files skipped from review due to trivial changes (6)
  • cvat/requirements/base.txt
  • site/content/en/docs/manual/advanced/formats/format-yolo-ultralytics-classification.md
  • tests/python/rest_api/test_projects.py
  • cvat/apps/engine/tests/test_rest_api.py
  • cvat/apps/dataset_manager/tests/assets/annotations.json
  • tests/python/rest_api/test_tasks.py
🔇 Additional comments (21)
cvat/requirements/base.in (1)

15-15: Confirm the stability of the new commit reference.
This line pins datumaro to a new commit. Please ensure this commit is tested and stable, and consider referencing a release tag if available to reduce unforeseen breakage.

cvat/apps/dataset_manager/formats/yolo.py (10)

80-82: Consistent naming for detection exporter.
Renaming _export_yolo_ultralytics_detection aligns with new Ultralytics YOLO nomenclature. The structure is good; no functional issues are apparent.


85-87: Consistent naming for oriented bounding boxes exporter.
Similar approach as detection exporter. Ensures uniform naming convention across the codebase.


90-95: Segmentation exporter transformation check.
Applying dataset.transform('masks_to_polygons') before export is correct for polygon-based YOLO formats. Everything else looks consistent with the new naming.


100-102: Consistent naming for pose exporter.
Renamed function properly references Ultralytics YOLO for pose tasks. Looks good.


105-107: Consistent naming for classification exporter.
No logical issues. Follows the rebranding to Ultralytics YOLO.


110-112: Consistent naming for detection importer.
Properly mirrors the exporter naming for detection. No immediate concerns.


115-117: Consistent naming for segmentation importer.
No functional changes other than name alignment. Looks fine.


120-122: Consistent naming for oriented bounding boxes importer.
Mirrors the exporter naming. Implementation remains the same.


125-126: Pose importer skeleton handling.
These lines add the proper format name for Ultralytics YOLO Pose. The usage of skeleton_sub_labels for the downstream import appears correct.

Also applies to: 138-138


144-146: Consistent naming for classification importer.
No functional regressions detected. Reflects the new naming scheme.

cvat/apps/dataset_manager/tests/test_formats.py (7)

295-299: Updated export formats to Ultralytics YOLO.
These new entries replace the old YOLOv8 references. Ensure coverage in test scenarios that rely on the old names.


332-336: Updated import formats to Ultralytics YOLO.
Mirrors the export updates. Double-check any external references or docs to prevent mismatch.


386-390: Empty image export for Ultralytics YOLO.
This test block includes checks for empty tasks/images. Confirm that the new formats handle empty sets gracefully.


Line range hint 516-516: Pose tasks on videos.
Here, 'Ultralytics YOLO Pose 1.0' is again included for test coverage. Good practice to confirm the code handles track-based or frame-based pose data.


Line range hint 572-572: Import condition for Pose in Job-based tests.
Matches the approach used elsewhere. Continue verifying final coverage in job-level tests.


Line range hint 950-950: Ultralytics YOLO Pose fallback.
Ensure that transformations (like shape merges or mask expansions) are correct for pose tasks.


Line range hint 1061-1061: Additional reference to Ultralytics YOLO Pose
Retests the import/export integration. Keep an eye on potential multi-skeleton scenarios.

cvat/apps/dataset_manager/tests/test_rest_api_formats.py (1)

58-58: Renamed YOLOv8 entries to Ultralytics YOLO.
These changes reflect the rebranding. Ensure no references to YOLOv8 remain in related test data or documentation.

Also applies to: 60-63

README.md (1)

178-182: LGTM! Documentation links are valid.

The format names have been consistently updated from "YOLOv8" to "Ultralytics YOLO" while maintaining the same documentation links.

✅ Verification successful

Documentation links are valid and accessible

All Ultralytics documentation links return HTTP 200 status codes, confirming they are accessible and working correctly. The format name changes from "YOLOv8" to "Ultralytics YOLO" are properly documented with valid links.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the documentation links are accessible
# Test: Check if the Ultralytics documentation links are valid
for url in \
  "https://docs.ultralytics.com/datasets/detect/" \
  "https://docs.ultralytics.com/datasets/obb/" \
  "https://docs.ultralytics.com/datasets/segment/" \
  "https://docs.ultralytics.com/datasets/pose/" \
  "https://docs.ultralytics.com/datasets/classify/"; do
  curl -sL -w "%{http_code}" "$url" -o /dev/null
done

Length of output: 1708

cvat/apps/dataset_manager/tests/assets/tasks.json (1)

637-638: LGTM! Format name consistently updated.

The format name and task name have been properly updated to use "Ultralytics YOLO" while maintaining the same configuration structure.

✅ Verification successful

Format name consistency verified across the codebase

The search results confirm that the format name "Ultralytics YOLO" is consistently used throughout the codebase. The occurrences of "YOLOv8" in the documentation are appropriate as they refer to the underlying framework rather than the format name itself. The format names in code, tests, and configuration files all follow the standardized pattern of "Ultralytics YOLO [Type] 1.0".

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify format name consistency across the codebase
# Test: Check for any remaining references to "YOLOv8" that should have been updated

# Search for any remaining YOLOv8 references that might have been missed
rg -i "yolov8" --type py --type json --type md

# Search for the new format name to ensure consistent usage
rg -i "ultralytics.+yolo" --type py --type json --type md

Length of output: 16155

@Eldies Eldies force-pushed the dl/yolov8-renaming branch from 8a76a6d to b866068 Compare December 24, 2024 07:40
@Eldies Eldies requested a review from nmanovic as a code owner December 24, 2024 10:54
@codecov-commenter
Copy link

codecov-commenter commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.89%. Comparing base (b1d0a6c) to head (9361121).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8863      +/-   ##
===========================================
- Coverage    73.90%   73.89%   -0.02%     
===========================================
  Files          408      408              
  Lines        44131    44131              
  Branches      3986     3986              
===========================================
- Hits         32617    32612       -5     
- Misses       11514    11519       +5     
Components Coverage Δ
cvat-ui 78.40% <ø> (-0.03%) ⬇️
cvat-server 70.06% <100.00%> (ø)

@zhiltsov-max
Copy link
Contributor

@Eldies, please resolve the conflict.

@Eldies Eldies merged commit 185a00b into develop Dec 26, 2024
35 checks passed
@Eldies Eldies deleted the dl/yolov8-renaming branch December 26, 2024 06:56
This was referenced Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants