[go: nahoru, domu]

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

Support DeepSparse Model Detection Results #297

Merged
merged 14 commits into from
Aug 18, 2023

Conversation

mwitiderrick
Copy link
Contributor
@mwitiderrick mwitiderrick commented Aug 18, 2023

Support DeepSparse Model Detection Results

from deepsparse import Pipeline
import supervision as sv
model_stub = "zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned85-none"
images = "basilica.jpg"
yolo_pipeline = Pipeline.create(task="yolo",model_path=model_stub)
pipeline_outputs = yolo_pipeline(images=images, iou_thres=0.6, conf_thres=0.001)
detections = sv.Detections.from_deepsparse(pipeline_outputs)
detections

https://colab.research.google.com/drive/1LsQ4xdnFfDVIrGBgmwjq-E8v_M_B-zqd?usp=sharing

@CLAassistant
Copy link
CLAassistant commented Aug 18, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor
@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello there, thank you for opening an PR ! 🙏🏻 The team was notified and they will get back to you asap.

@SkalskiP
Copy link
Collaborator

Hi @mwitiderrick 👋🏻! Thanks for your interest in supervision and submitting a PR. Will that connector work with every DeepSparse model or only YOLOv5?

@mwitiderrick
Copy link
Contributor Author
mwitiderrick commented Aug 18, 2023

Hey @SkalskiP this is specific for DeepSparse detection models that will return a boxes attribute, such as YOLOv5 and YOLOv8

@mwitiderrick mwitiderrick changed the title Support DeepSparse YOLOv5 Results Support DeepSparse Model Detection Results Aug 18, 2023
@SkalskiP
Copy link
Collaborator

@onuralpszr I see some problems with the 88-character line length in this PR. We have a line in the docstring that can't be made shorter.

@onuralpszr
Copy link
Collaborator

@onuralpszr I see some problems with the 88-character line length in this PR. We have a line in the docstring that can't be made shorter.

Well I was going to fix but @mwitiderrick just did it. So all good :)

@mwitiderrick thank you

@onuralpszr
Copy link
Collaborator

@mwitiderrick btw If you don't mind can you squash your commits to make it clean or we can handle in merge as well.

@mwitiderrick
Copy link
Contributor Author

@mwitiderrick btw If you don't mind can you squash your commits to make it clean or we can handle in merge as well.

@onuralpszr okay with the option for handling at merge time

@SkalskiP
Copy link
Collaborator
SkalskiP commented Aug 18, 2023

@mwitiderrick and @onuralpszr, but that is not valid line braking 🤣 you cant break string like that. Not to mention that example must look good in docs. @onuralpszr to be honest I care more about code example readability in docs than perfect 88-character lines in docsting.

>>> yolo_pipeline = Pipeline.create(
...     task="yolo",
...     model_path="zoo:cv/detection/yolov5-l/pytorch/
...        ultralytics/coco/pruned80_quant-none")
>>> pipeline_outputs = yolo_pipeline(SOURCE_IMAGE_PATH,
...                         iou_thres=0.6, conf_thres=0.001)

@SkalskiP
Copy link
Collaborator

@onuralpszr As for squash, I'm in favor. Let's just make sure @mwitiderrick will get the credit for contribution, and that squashed commit won't be assigned to me or other person who click "merge" button.

@onuralpszr
Copy link
Collaborator
onuralpszr commented Aug 18, 2023

@mwitiderrick and @onuralpszr, but that is not valid line braking 🤣 you cant break string like that. Not to mention that example must look good in docs. @onuralpszr to be honest I care more about code example readability in docs than perfect 88-character lines in docsting.

>>> yolo_pipeline = Pipeline.create(
...     task="yolo",
...     model_path="zoo:cv/detection/yolov5-l/pytorch/
...        ultralytics/coco/pruned80_quant-none")
>>> pipeline_outputs = yolo_pipeline(SOURCE_IMAGE_PATH,
...                         iou_thres=0.6, conf_thres=0.001)

Sorry I might be decide too quickly. Let me check it out properly. I will handle squash part too.

Signed-off-by: Onuralp SEZER <thunderbirdtr@fedoraproject.org>
@onuralpszr
Copy link
Collaborator

image

image

@onuralpszr
Copy link
Collaborator

Is it all good guys ? :))

@onuralpszr onuralpszr added the enhancement New feature or request label Aug 18, 2023
@mwitiderrick
Copy link
Contributor Author

lgtm

@onuralpszr onuralpszr self-requested a review August 18, 2023 10:59
Copy link
Collaborator
@onuralpszr onuralpszr left a comment

Choose a reason for hiding this comment

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

LGTM, thank your for your contribution. Merging in

@onuralpszr onuralpszr merged commit 6a2203c into roboflow:develop Aug 18, 2023
6 checks passed
@onuralpszr
Copy link
Collaborator

@onuralpszr As for squash, I'm in favor. Let's just make sure @mwitiderrick will get the credit for contribution, and that squashed commit won't be assigned to me or other person who click "merge" button.

"6a2203c" just his name and all clean.

@mwitiderrick again awesome job and thank you again !

@onuralpszr onuralpszr added this to the version: 0.14.0 milestone Aug 18, 2023
@mwitiderrick
Copy link
Contributor Author

@onuralpszr when does the new feature become available via pip install?

@onuralpszr
Copy link
Collaborator

@onuralpszr when does the new feature become available via pip install?

#296 (comment). that's the only answer I can find :) but that is question for @SkalskiP :)

@SkalskiP
Copy link
Collaborator
SkalskiP commented Aug 18, 2023

Is it all good guys ? :))

@onuralpszr Good enough for now ;) But I still think we need deeper into that formatting. Perfect solution would be 88 characters for code and 120 for docstrings.

when does the new feature become available via pip install?

@mwitiderrick 1-2 weeks is the timeline for the next release. We might do some pre-releases next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants