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] Fixing the sparsezoo pathway #1517

Merged
merged 5 commits into from
Apr 12, 2023

Conversation

dbogunowicz
Copy link
Contributor

@dbogunowicz dbogunowicz commented Apr 11, 2023

Fix for: https://app.asana.com/0/1203126676641557/1204359816230311/f

Testing

Testing with "base" sparseml model

sparseml.ultralytics.val --model zoo:cv/detection/yolov8-s/pytorch/ultralytics/coco/base-none --data coco.yaml

Outputs:

 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.009
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.013
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.010
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.002
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.008
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.016
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.012
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.017
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.018
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.009
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.018
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.025

Testing with "vanilla" ultralytics model

sparseml.ultralytics.val --model yolov8n.pt --data coco128.yaml

Outputs:

Ultralytics YOLOv8.0.30 🚀 Python-3.8.10 torch-1.12.1+cu116 CUDA:0 (NVIDIA RTX A4000, 16117MiB)
val: Scanning /home/ubuntu/damian/deepsparse/datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100%|██████████| 128/128 [00:00<?, ?it/s]
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100%|██████████| 8/8 [00:01<00:00,  6.26it/s]
                   all        128        929       0.64      0.537      0.605      0.446
Speed: 0.1ms pre-process, 2.1ms inference, 0.0ms loss, 0.7ms post-process per image

Testing with dummy sparseml checkpoint model

sparseml.ultralytics.val --model runs/detect/train281/weights/last.pt --data coco128.yaml

Outputs:

Ultralytics YOLOv8.0.30 🚀 Python-3.8.10 torch-1.12.1+cu116 CUDA:0 (NVIDIA RTX A4000, 16117MiB)
val: Scanning /home/ubuntu/damian/deepsparse/datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100%|██████████| 128/128 [00:00<?, ?it/s]
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100%|██████████| 8/8 [00:01<00:00,  6.93it/s]
                   all        128        929          0          0          0          0
Speed: 0.1ms pre-process, 4.1ms inference, 0.0ms loss, 0.0ms post-process per image

@anmarques
Copy link
Member

After update sparseml.ultralytics.val works

@dbogunowicz dbogunowicz marked this pull request as ready for review April 12, 2023 10:49
@dbogunowicz dbogunowicz requested review from a team, tdg5, dfneuralmagic and anmarques and removed request for a team April 12, 2023 11:50
@dbogunowicz dbogunowicz merged commit 674d50e into main Apr 12, 2023
@dbogunowicz dbogunowicz deleted the feature/damian/fixing_sparsezoo_checkpoints_yolov8 branch April 12, 2023 14: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.

None yet

3 participants