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

[YOLOV8] Update version #1138

Merged
merged 8 commits into from
Jul 25, 2023
Merged

[YOLOV8] Update version #1138

merged 8 commits into from
Jul 25, 2023

Conversation

dsikka
Copy link
Contributor

@dsikka dsikka commented Jul 21, 2023

Summary

  • Updated deepsparse support for yolov8
  • Small similar changes to the ones made for sparseml's yolov8 update
  • process_engine_outputs has a slight change. Previously providing nm for number of masks, which is no longer used by the yolov8 non_max_suppression function.

Testing:

  • Tested locally using both sparsezoo and yolov8 models for both segmentation and detection
  • Workflows tested: pipeline creation and forward pass, annotation, eval and benchmarking

sparsezoo models tested:

  1. detection: "zoo:cv/detection/yolov8-m/pytorch/ultralytics/coco/base_quant-none"
  2. segmentation: "zoo:cv/segmentation/yolov8-n/pytorch/ultralytics/coco/base-none"

yolov8 models tested:

  1. detection: yolov8n.pt
  2. segmentation: yolov8n-seg.pt

Pipeline creation + forward pass:

Detection

from deepsparse import Pipeline
model_path = "yolov8n.onnx" 
images = ["basilica.jpg"]
yolo_pipeline = Pipeline.create(
    task="yolov8",
    model_path=model_path,
)
pipeline_outputs = yolo_pipeline(images=images)

Segmentation:

from deepsparse import Pipeline
model_path = "yolov8n-seg.onnx" 
images = ["basilica.jpg"]
yolo_pipeline = Pipeline.create(
    task="yolov8",
    subtask="segmentation",
    model_path=model_path,
)

pipeline_outputs = yolo_pipeline(images=images)

Annotation:

Detection:
deepsparse.yolov8.annotate --source basilica.jpg --model_filepath "yolov8n.onnx"
Segmentation:
deepsparse.yolov8.annotate --source basilica.jpg --model_filepath "yolov8n-seg.onnx" --subtask segmentation

Results verified for outputs produced by both workflows above

Eval

Detection:
deepsparse.yolov8.eval --model_path yolov8n.onnx
Segementation:
deepsparse.yolov8.eval --model_path yolov8n-seg.onnx --subtask segmentation

@dsikka dsikka marked this pull request as ready for review July 24, 2023 17:56
@dsikka dsikka requested review from dbogunowicz, rahul-tuli, abhinavnmagic, bfineran and anmarques and removed request for dbogunowicz July 24, 2023 18:00
bfineran
bfineran previously approved these changes Jul 24, 2023
@dsikka dsikka merged commit 982938b into main Jul 25, 2023
7 checks passed
@dsikka dsikka deleted the yolov8_update branch July 25, 2023 14:58
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.

None yet

3 participants