Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 2215645

Browse files
authored
replace recipe paths with zoo stubs (#1021) (#1023)
1 parent 4d44da6 commit 2215645

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

integrations/ultralytics-yolov5/tutorials/sparsifying_yolov5_using_recipes.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ The table below compares these tradeoffs and shows how to run them on the COCO d
131131
132132
| Recipe Name | Description | Train Command | COCO [email protected] | Size on Disk | DeepSparse Performance** |
133133
|----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|--------------|--------------------------|
134-
| YOLOv5s Baseline | The baseline, small YOLOv5 model used as the starting point for sparsification. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5s.yaml --weights "" --data coco.yaml --hyp data/hyps/hyp.scratch.yaml ``` | 0.556 | 24.8 MB | 135.8 img/sec |
135-
| [YOLOv5s Pruned](https://github.com/neuralmagic/sparseml/blob/main/integrations/ultralytics-yolov5/recipes/yolov5s.pruned.md) | Creates a highly sparse, FP32 YOLOv5s model that recovers close to the baseline model. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5s.yaml --weights PATH_TO_COCO_PRETRAINED_WEIGHTS --data coco.yaml --hyp data/hyps/hyp.scratch.yaml --recipe recipes/yolov5s.pruned.md ``` | 0.534 | 8.4 MB | 199.1 img/sec |
136-
| [YOLOv5s Pruned Quantized](https://github.com/neuralmagic/sparseml/blob/main/integrations/ultralytics-yolov5/recipes/yolov5s.pruned_quantized.md) | Creates a highly sparse, INT8 YOLOv5s model that recovers reasonably close to the baseline model. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5s.yaml --weights PATH_TO_COCO_PRETRAINED_WEIGHTS --data coco.yaml --hyp data/hyps/hyp.scratch.yaml --recipe recipes/yolov5s.pruned_quantized.md ``` | 0.525 | 3.3 MB | 396.7 img/sec |
137-
| YOLOv5l Baseline | The baseline, large YOLOv5 model used as the starting point for sparsification. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5l.yaml --weights "" --data coco.yaml --hyp data/hyps/hyp.scratch.yaml ``` | 0.654 | 154 MB | 27.9 img/sec |
138-
| [YOLOv5l Pruned](https://github.com/neuralmagic/sparseml/blob/main/integrations/ultralytics-yolov5/recipes/yolov5l.pruned.md) | Creates a highly sparse, FP32 YOLOv5l model that recovers close to the baseline model. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5l.yaml --weights PATH_TO_COCO_PRETRAINED_WEIGHTS --data coco.yaml --hyp data/hyps/hyp.scratch.yaml --recipe recipes/yolov5l.pruned.md ``` | 0.643 | 32.8 MB | 63.7 img/sec |
139-
| [YOLOv5l Pruned Quantized](https://github.com/neuralmagic/sparseml/blob/main/integrations/ultralytics-yolov5/recipes/yolov5l.pruned_quantized.md) | Creates a highly sparse, INT8 YOLOv5l model that recovers reasonably close to the baseline model. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5l.yaml --weights PATH_TO_COCO_PRETRAINED_WEIGHTS --data coco.yaml --hyp data/hyps/hyp.scratch.yaml --recipe recipes/yolov5l.pruned_quantized.md ``` | 0.623 | 12.7 MB | 139.8 img/sec |
134+
| [YOLOv5s Baseline](https://sparsezoo.neuralmagic.com/models/cv%2Fdetection%2Fyolov5-s%2Fpytorch%2Fultralytics%2Fcoco%2Fbase-none) | The baseline, small YOLOv5 model used as the starting point for sparsification. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5s.yaml --weights "" --data coco.yaml --hyp data/hyps/hyp.scratch.yaml ``` | 0.556 | 24.8 MB | 135.8 img/sec |
135+
| [YOLOv5s Pruned](https://sparsezoo.neuralmagic.com/models/cv%2Fdetection%2Fyolov5-s%2Fpytorch%2Fultralytics%2Fcoco%2Fpruned-aggressive_96) | Creates a highly sparse, FP32 YOLOv5s model that recovers close to the baseline model. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5s.yaml --weights PATH_TO_COCO_PRETRAINED_WEIGHTS --data coco.yaml --hyp data/hyps/hyp.scratch.yaml --recipe zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned-aggressive_96 ``` | 0.534 | 8.4 MB | 199.1 img/sec |
136+
| [YOLOv5s Pruned Quantized](https://sparsezoo.neuralmagic.com/models/cv%2Fdetection%2Fyolov5-s%2Fpytorch%2Fultralytics%2Fcoco%2Fpruned_quant-aggressive_94) | Creates a highly sparse, INT8 YOLOv5s model that recovers reasonably close to the baseline model. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5s.yaml --weights PATH_TO_COCO_PRETRAINED_WEIGHTS --data coco.yaml --hyp data/hyps/hyp.scratch.yaml --recipe zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned_quant-aggressive_94 ``` | 0.525 | 3.3 MB | 396.7 img/sec |
137+
| [YOLOv5l Baseline](https://sparsezoo.neuralmagic.com/models/cv%2Fdetection%2Fyolov5-l%2Fpytorch%2Fultralytics%2Fcoco%2Fbase-none) | The baseline, large YOLOv5 model used as the starting point for sparsification. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5l.yaml --weights "" --data coco.yaml --hyp data/hyps/hyp.scratch.yaml ``` | 0.654 | 154 MB | 27.9 img/sec |
138+
| [YOLOv5l Pruned](https://sparsezoo.neuralmagic.com/models/cv%2Fdetection%2Fyolov5-l%2Fpytorch%2Fultralytics%2Fcoco%2Fpruned-aggressive_98) | Creates a highly sparse, FP32 YOLOv5l model that recovers close to the baseline model. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5l.yaml --weights PATH_TO_COCO_PRETRAINED_WEIGHTS --data coco.yaml --hyp data/hyps/hyp.scratch.yaml --recipe zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned-aggressive_98 ``` | 0.643 | 32.8 MB | 63.7 img/sec |
139+
| [YOLOv5l Pruned Quantized](https://sparsezoo.neuralmagic.com/models/cv%2Fdetection%2Fyolov5-l%2Fpytorch%2Fultralytics%2Fcoco%2Fpruned_quant-aggressive_95) | Creates a highly sparse, INT8 YOLOv5l model that recovers reasonably close to the baseline model. | ``` sparseml.yolov5.train --cfg models_v5.0/yolov5l.yaml --weights PATH_TO_COCO_PRETRAINED_WEIGHTS --data coco.yaml --hyp data/hyps/hyp.scratch.yaml --recipe zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned_quant-aggressive_95 ``` | 0.623 | 12.7 MB | 139.8 img/sec |
140140
141141
\*\* DeepSparse Performance measured on an AWS c5.12xlarge instance with 24 cores, batch size 64, and 640x640 input with version 0.12.0 of the DeepSparse Engine i.e. `deepsparse.benchmark --batch_size 64 --scenario sync [model_path]`
142142

integrations/ultralytics-yolov5/tutorials/yolov5_sparse_transfer_learning.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,23 @@ The recipes are specific to the sparsification type, so the training command wil
104104

105105
- YOLOv5s Pruned transfer learning:
106106
```bash
107-
sparseml.yolov5.train --data VOC.yaml --cfg /models_v5.0/yolov5s.yaml --weights zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned-aggressive_96?recipe_type=transfer --hyp data/hyps/hyp.finetune.yaml --recipe /recipes/yolov5.transfer_learn_pruned.md
107+
sparseml.yolov5.train --data VOC.yaml --cfg models_v5.0/yolov5s.yaml --weights zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned-aggressive_96?recipe_type=transfer --hyp data/hyps/hyp.finetune.yaml --recipe zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned-aggressive_96?recipe_type=transfer
108108
```
109109
- YOLOv5s Pruned-Quantized transfer learning:
110110
```bash
111-
sparseml.yolov5.train --data VOC.yaml --cfg models_v5.0/yolov5s.yaml --weights zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned_quant-aggressive_94?recipe_type=transfer --hyp data/hyps/hyp.finetune.yaml --recipe recipes/yolov5.transfer_learn_pruned_quantized.md
111+
sparseml.yolov5.train --data VOC.yaml --cfg models_v5.0/yolov5s.yaml --weights zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned_quant-aggressive_94?recipe_type=transfer --hyp data/hyps/hyp.finetune.yaml --recipe zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned_quant-aggressive_94?recipe_type=transfer
112112
```
113113
- YOLOv5s Baseline transfer learning:
114114
```bash
115115
sparseml.yolov5.train --data VOC.yaml --cfg models_v5.0/yolov5s.yaml --weights zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/base-none --hyp data/hyps/hyp.finetune.yaml --epochs 50
116116
```
117117
- YOLOv5l Pruned transfer learning:
118118
```bash
119-
sparseml.yolov5.train --data VOC.yaml --cfg models_v5.0/yolov5l.yaml --weights zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned-aggressive_98?recipe_type=transfer --hyp data/hyps/hyp.finetune.yaml --recipe recipes/yolov5.transfer_learn_pruned.md
119+
sparseml.yolov5.train --data VOC.yaml --cfg models_v5.0/yolov5l.yaml --weights zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned-aggressive_98?recipe_type=transfer --hyp data/hyps/hyp.finetune.yaml --recipe zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned-aggressive_98?recipe_type=transfer
120120
```
121121
- YOLOv5l Pruned-Quantized transfer learning:
122122
```bash
123-
sparseml.yolov5.train --data VOC.yaml --cfg models_v5.0/yolov5l.yaml --weights zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned_quant-aggressive_95?recipe_type=transfer --hyp data/hyps/hyp.finetune.yaml --recipe recipes/yolov5.transfer_learn_pruned_quantized.md
123+
sparseml.yolov5.train --data VOC.yaml --cfg models_v5.0/yolov5l.yaml --weights zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned_quant-aggressive_95?recipe_type=transfer --hyp data/hyps/hyp.finetune.yaml --recipe zoo:cv/detection/yolov5-l/pytorch/ultralytics/coco/pruned_quant-aggressive_95?recipe_type=transfer
124124
```
125125
- YOLOv5l Baseline transfer learning:
126126
```bash

0 commit comments

Comments
 (0)