-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Feature/ultralytics all models for Classification #281
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
Feature/ultralytics all models for Classification #281
Conversation
Hi, @mayankagarwals 👋🏻! Could you create a small Google Colab to test that change? |
supervision/classification/core.py
Outdated
@@ -40,6 +42,9 @@ def __post_init__(self) -> None: | |||
_validate_confidence(self.confidence, n) | |||
|
|||
@classmethod | |||
@deprecated( | |||
"This method is deprecated and removed in 0.15.0 release. Use sv.Classifications.from_ultralytics() instead." |
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.
Let's make that 0.16.0
. We should give people at least 2 full release cycles to migrate. That change will be released with 0.14.0
.
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.
Done!
supervision/classification/core.py
Outdated
>>> import supervision as sv | ||
|
||
>>> image = cv2.imread(SOURCE_IMAGE_PATH) | ||
>>> model = YOLO('yolov8s.pt') |
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.
Let's update the example to use only detection and segmentation models here.
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.
Didn't quite get you. yolov8s.pt
is a detection model itself. We can add a classification model here if that's what you mean
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.
That is my point exactly. We are documenting sv.Classifications.from_ultralytics
but we are showing examples of usage with detection models. We should show classification model examples.
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.
Done! Although I can see only yolo models for classification on ultralytics https://docs.ultralytics.com/tasks/classify/
Hi @artyaltanzaya 👋🏻 I did an initial round of reviews on this PR. Please take it from here 🙏🏻 and cooperate with @mayankagarwals to make sure we will be able to release that change with |
Hi @SkalskiP Have added a testing colab in the description. |
@mayankagarwals 🙏🏻 please also make sure to resolve |
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.
Thank you for the updates 👍. Added two comments! One is resolved, thanks for the quick action.
…classificationUltralytics
@onuralpszr Couple things with the pre-commit-ci
|
For CLA I need to ask because I did not added. For flake it I only saw long line error so it is normal. :) Also you can squash those changes for make it look clean :) |
@SkalskiP this require your attention for CLA-bot: https://github.com/cla-assistant/cla-assistant#can-i-allow-bot-user-contributions |
@mayankagarwals CLA part has been solved, thanks to @capjamesg. |
Yes yes, just FYI that there is a minor behavior change. If it's intentional, no issues
Amazing, thanks! @artyaltanzaya All issues are addressed :) |
@mayankagarwals I found a small problem during the final tests. You can take a look here. Committed a fix into your branch. It looks like we are ready to merge. |
@capjamesg thanks for solving issues with bot users 🙏🏻 |
@SkalskiP Thanks for the fix That's quite a crucial fix. Apologies for the lapse on my part, it's my first commit to the classification part of codebase. Looks like I got the semantics of the Classifications feature wrong. For some reason I thought it was class of bounding boxes classified. That's my bad. Your fix does solve that. My only worry is Again, thanks for the support! |
No worries! That's why we have multiple people looking at the code and testing. ;) |
Successor of #222
Testing colab: https://colab.research.google.com/drive/1pxIqThTJwoP8Hwu95KZ3CUUio69w3_Ig?usp=sharing