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

Add YOLO11 Models to Zoo #4899

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Add YOLO11 Models to Zoo #4899

wants to merge 7 commits into from

Conversation

jacobmarks
Copy link
Contributor

@jacobmarks jacobmarks commented Oct 5, 2024

What changes are proposed in this pull request?

Adds YOLO11 detection and segmentation models to the zoo manifest and the integration docs.

Note that unlike previous yolo models, which included a "v" in the name, they do away with that here. So instead of "yolov11n", it is "yolo11n".

Only detection and segmentation models are explicitly added to the zoo because these are the only ones (not the OBB, classification, and pose) which have superior performance to yolov8.

Release Notes

Is this a user-facing change that should be mentioned in the release notes?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

YOLO11 detection and segmentation models added to the model zoo, bringing significant inference speedups on TensorRT compared to previous yolo models

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

Summary by CodeRabbit

  • New Features

    • Expanded support for YOLOv11 models in the documentation, including object detection and instance segmentation examples.
    • Enhanced integration of various Ultralytics models into the FiftyOne framework, allowing for better processing and formatting of model outputs.
  • Documentation

    • Updated documentation to include new commented code snippets for loading YOLOv11 models from the FiftyOne Model Zoo.

Copy link
Contributor

coderabbitai bot commented Oct 5, 2024

Walkthrough

The pull request updates the FiftyOne documentation and functionality to support additional YOLO models, specifically YOLOv11. It includes new commented-out code snippets for loading various YOLOv11 models in the documentation, as well as enhancements in the fiftyone/utils/ultralytics.py file. This includes the introduction of new model classes and modifications to existing methods to facilitate the integration and processing of Ultralytics models within the FiftyOne framework.

Changes

File Change Summary
docs/source/integrations/ultralytics.rst Added commented lines for loading YOLOv11 models in object detection, instance segmentation, and Model Zoo sections.
fiftyone/utils/ultralytics.py Introduced new classes for handling Ultralytics models (e.g., FiftyOneRTDETRModel, FiftyOneYOLOOBBModel). Updated methods for formatting predictions and processing outputs.

Possibly related PRs

Suggested reviewers

  • harpreetsahota204
  • danielgural
  • brimoor

🐇 In the meadow, models grow,
YOLOv11, now in tow!
With snippets bright, our docs align,
In FiftyOne, they surely shine.
So hop along, let’s integrate,
A world of models, oh, how great! 🌟


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 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.

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

🧹 Outside diff range and nitpick comments (1)
docs/source/integrations/ultralytics.rst (1)

108-114: LGTM! Consider adding a brief comment about YOLO11.

The addition of YOLO11 models is consistent with the PR objectives and follows the correct naming convention. To improve clarity for users, consider adding a brief comment above the YOLO11 section, similar to the comments for other YOLO versions.

    # YOLOv10
    # model = YOLO("yolov10n.pt)
    # model = YOLO("yolov10s.pt)
    # model = YOLO("yolov10m.pt)
    # model = YOLO("yolov10l.pt)
    # model = YOLO("yolov10x.pt)

+   # YOLO11 (latest version with improved performance)
    # YOLOv11
    # model = YOLO("yolo11n.pt)
    # model = YOLO("yolo11s.pt)
    # model = YOLO("yolo11m.pt)
    # model = YOLO("yolo11l.pt)
    # model = YOLO("yolo11x.pt)
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 54ce128 and ba7e00f.

⛔ Files ignored due to path filters (1)
  • fiftyone/zoo/models/manifest-torch.json is excluded by !**/*.json
📒 Files selected for processing (2)
  • docs/source/integrations/ultralytics.rst (4 hunks)
  • fiftyone/utils/ultralytics.py (0 hunks)
💤 Files with no reviewable changes (1)
  • fiftyone/utils/ultralytics.py
🔇 Additional comments (2)
docs/source/integrations/ultralytics.rst (2)

150-150: LGTM! YOLO11 Model Zoo integration looks good.

The addition of the YOLO11x model to the Model Zoo section is consistent with the PR objectives and follows the correct naming convention.


193-197: LGTM! YOLO11 segmentation models added correctly.

The addition of YOLO11 segmentation models is consistent with the PR objectives and follows the correct naming convention. The inclusion of only s, m, l, and x variants aligns with the PR summary about including only models with superior performance.

Comment on lines +223 to +243
You can also load YOLOv8, YOLOv9, and YOLO11 segmentation models from the
:ref:`FiftyOne Model Zoo <model-zoo>`:

.. code-block:: python
:linenos:

model_name = "yolov9c-seg-coco-torch"
# model_name = "yolov9e-seg-coco-torch"
# model_name = "yolov8x-seg-coco-torch"
# model_name = "yolov8l-seg-coco-torch"
# model_name = "yolov8m-seg-coco-torch"
model_name = "yolov8n-seg-coco-torch"
# model_name = "yolov8s-seg-coco-torch"
# model_name = "yolov8n-seg-coco-torch"
# model_name = "yolov8m-seg-coco-torch"
# model_name = "yolov8l-seg-coco-torch"
# model_name = "yolov8x-seg-coco-torch"

# model_name = "yolov9c-seg-coco-torch"
# model_name = "yolov9e-seg-coco-torch"

# model_name = "yolo11n-seg-coco-torch"
# model_name = "yolo11s-seg-coco-torch"
# model_name = "yolo11m-seg-coco-torch"
# model_name = "yolo11l-seg-coco-torch"
# model_name = "yolo11x-seg-coco-torch"

Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Inconsistent Inclusion of yolo11n-seg Model

The yolo11n-seg-coco-torch model is included in the Model Zoo section but is absent from the Instance Segmentation section. Please ensure that yolo11n-seg is consistently referenced across all relevant sections to maintain clarity and completeness.

  • Verify if yolo11n-seg should be available in the Instance Segmentation section.
  • Update the Instance Segmentation section accordingly to include or exclude yolo11n-seg.
🔗 Analysis chain

LGTM with a minor inconsistency.

The addition of YOLO11 segmentation models to the Model Zoo section is consistent with the PR objectives and follows the correct naming convention. However, there's a minor inconsistency:

  1. The yolo11n-seg model is included here but not in the previous instance segmentation section.
  2. The PR summary states that only models demonstrating superior performance are included.

Please verify if the yolo11n-seg model should be included, and ensure consistency across all sections.

To verify the inclusion of the yolo11n-seg model, please run the following script:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for the presence of yolo11n-seg model in different sections

# Check in the instance segmentation section
echo "Checking instance segmentation section:"
sed -n '/Instance segmentation/,/You can also load/p' docs/source/integrations/ultralytics.rst | grep -i 'yolo11.*-seg'

echo -e "\nChecking Model Zoo section:"
# Check in the Model Zoo section
sed -n '/You can also load.*segmentation models/,/model = foz.load_zoo_model/p' docs/source/integrations/ultralytics.rst | grep -i 'yolo11.*-seg'

Length of output: 797

Copy link
Contributor

@brimoor brimoor left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

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.

2 participants