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-Seg] Validation #924

Merged
merged 18 commits into from
Feb 28, 2023
Merged

[YOLOv8-Seg] Validation #924

merged 18 commits into from
Feb 28, 2023

Conversation

dbogunowicz
Copy link
Contributor

@dbogunowicz dbogunowicz commented Feb 24, 2023

The validators obey the following hierarchy of inheritance (to reduce the bloating of the codebase):

DeepSparseSegmentationValidator has parents:
- SegmentationValidator (Ultralytics)
- DeepsparseValidator (that handles the main inference method `__call__`)

DeepSparseDetectionValidator has parents:
- DetectionValidator (Ultralytics)
- DeepsparseValidator (that handles the main inference method `__call__`)

adding classification task potentially in the future will be trivial.

Testing plan:

  • Test annotation for YOLO (sanity check)
  • Test annotation for YOLOv8 Det (sanity check)
  • Test annotation for YOLOv8 Seg (sanity check)
  • Test validation for YOLOv8 Det
  • Test validation for YOLOv8 Seg

Validation on yolov8n.onnx reproduces the results reported by the authors:
image
vs

/home/ubuntu/damian/deepsparse_venv/bin/python /home/ubuntu/damian/deepsparse/src/deepsparse/yolov8/validation.py --dataset_yaml coco.yaml --model-path yolov8n-seg.onnx --subtask segmentation 
DeepSparse, Copyright 2021-present / Neuralmagic, Inc. version: 1.4.0.20230211 COMMUNITY | (bacdaef4) (release) (optimized) (system=avx2, binary=avx2)
Ultralytics YOLOv8.0.30 🚀 Python-3.8.10 torch-1.13.1+cu117 CUDA:0 (NVIDIA RTX A4000, 16117MiB)
val: Scanning /home/ubuntu/damian/deepsparse/datasets/coco/labels/val2017.cache... 4952 images, 48 backgrounds, 0 corrupt: 100%|██████████| 5000/5000 [00:00<?, ?it/s]
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95)     Mask(P          R      mAP50  mAP50-95): 100%|██████████| 313/313 [13:58<00:00,  2.68s/it]
                   all       5000      36335      0.621      0.479      0.516      **0.363**      0.617      0.456      0.489      **0.305**

...

@dbogunowicz dbogunowicz marked this pull request as ready for review February 27, 2023 14:42
@dbogunowicz dbogunowicz changed the base branch from main to feature/damian/cleanupseg1 February 27, 2023 14:49
bfineran
bfineran previously approved these changes Feb 27, 2023
Copy link
Contributor

@bfineran bfineran left a comment

Choose a reason for hiding this comment

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

LGTM - sanity check looks good

Co-authored-by: Konstantin Gulin <66528950+KSGulin@users.noreply.github.com>
KSGulin
KSGulin previously approved these changes Feb 28, 2023
Copy link
Contributor

@KSGulin KSGulin left a comment

Choose a reason for hiding this comment

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

LGTM!

Wanted to note for the casual observer that all commits in this PR were authored by @dbogunowicz and any attributions to me are due to an internal server environment hiccup

Base automatically changed from feature/damian/cleanupseg1 to main February 28, 2023 12:40
@dbogunowicz dbogunowicz dismissed stale reviews from KSGulin and bfineran via 4750912 February 28, 2023 12:40
@dbogunowicz dbogunowicz merged commit c0df30e into main Feb 28, 2023
@dbogunowicz dbogunowicz deleted the feature/damian/yolov8seg_val branch February 28, 2023 13:52
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.

4 participants