Skip to content

Support DeepSparse Model Detection Results - #297

Merged
onuralpszr merged 14 commits into
roboflow:developfrom
mwitiderrick:develop
Aug 18, 2023
Merged

onuralpszr merged 14 commits into
roboflow:developfrom
mwitiderrick:develop

Conversation

@mwitiderrick

@mwitiderrick mwitiderrick commented Aug 18, 2023 •

Copy link
Copy Markdown
Contributor

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

CLAassistant commented Aug 18, 2023 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

mwitiderrick commented Aug 18, 2023 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

@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
Copy Markdown
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

SkalskiP commented Aug 18, 2023 •

Copy link
Copy Markdown
Collaborator

@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
Copy Markdown
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

onuralpszr commented Aug 18, 2023 •

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

image

image

@onuralpszr

Copy link
Copy Markdown
Contributor

Is it all good guys ? :))

@onuralpszr onuralpszr added the enhancement New feature or request label Aug 18, 2023
@mwitiderrick

Copy link
Copy Markdown
Contributor Author

lgtm

@onuralpszr
onuralpszr self-requested a review August 18, 2023 10:59

@onuralpszr onuralpszr left a comment

Copy link
Copy Markdown
Contributor

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
@onuralpszr

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

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

@onuralpszr

Copy link
Copy Markdown
Contributor

@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

SkalskiP commented Aug 18, 2023 •

Copy link
Copy Markdown
Collaborator

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.

4 participants