michal-sokolski-tcl
commited on
Commit
•
8813ba2
1
Parent(s):
3c121f2
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,68 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
pipeline_tag: object-detection
|
4 |
+
tags:
|
5 |
+
- pytorch
|
6 |
+
- torch-dag
|
7 |
---
|
8 |
+
# Model Card for yolov8n_pruned_73
|
9 |
+
|
10 |
+
This is a prunned version of the [YOLOv8n](https://github.com/ultralytics/ultralytics#models) model in a [toch-dag](https://github.com/TCLResearchEurope/torch-dag) format.
|
11 |
+
|
12 |
+
This model has rougly 73% of the original model FLOPs with small metrics drop.
|
13 |
+
|
14 |
+
|
15 |
+
| Model | KMAPPs* | M Parameters | mAP50-95 (640x640) |
|
16 |
+
| ----------- | ------- | ------------ | ------------------ |
|
17 |
+
| **YOLOv8n (baseline)** | 21.5 | 3.16 | 37.3 |
|
18 |
+
| **yolov8n_pruned_73 (ours)** | 15.7 **(73%)** | 2.65 **(84%)** | 34.9 **(↓ 2.4)** |
|
19 |
+
|
20 |
+
|
21 |
+
\***KMAPPs** thousands of FLOPs per input pixel
|
22 |
+
|
23 |
+
`KMAPPs(model) = FLOPs(model) / (H * W * 1000)`, where `(H, W)` is the input resolution.
|
24 |
+
|
25 |
+
The accuracy was calculated on the COCO val2017 dataset. For details about image pre-processing, please refer to the original repository.
|
26 |
+
## Model Details
|
27 |
+
|
28 |
+
### Model Description
|
29 |
+
|
30 |
+
|
31 |
+
- **Developed by:** [TCL Research Europe](https://github.com/TCLResearchEurope/)
|
32 |
+
- **Model type:** Object detection
|
33 |
+
- **License:** Apache 2.0
|
34 |
+
- **Finetuned from model:** [YOLOv8n](https://github.com/ultralytics/ultralytics#models)
|
35 |
+
|
36 |
+
### Model Sources
|
37 |
+
- **Repository:** [YOLOv8n](https://github.com/ultralytics/ultralytics#models)
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
## How to Get Started with the Model
|
42 |
+
|
43 |
+
To load the model, You have to install [torch-dag](https://github.com/TCLResearchEurope/torch-dag#3-installation) library, which can be done using `pip` by
|
44 |
+
|
45 |
+
```
|
46 |
+
pip install torch-dag
|
47 |
+
```
|
48 |
+
|
49 |
+
then, clone this repository
|
50 |
+
|
51 |
+
```
|
52 |
+
# Make sure you have git-lfs installed (https://git-lfs.com)
|
53 |
+
git lfs install
|
54 |
+
git clone https://huggingface.co/TCLResearchEurope/yolov8n_pruned_73
|
55 |
+
```
|
56 |
+
|
57 |
+
and now You are ready to load the model:
|
58 |
+
|
59 |
+
```
|
60 |
+
import torch_dag
|
61 |
+
import torch
|
62 |
+
|
63 |
+
model = torch_dag.io.load_dag_from_path('./yolov8n_pruned_73')
|
64 |
+
|
65 |
+
model.eval()
|
66 |
+
out = model(torch.ones(1, 3, 224, 224))
|
67 |
+
print(out.shape)
|
68 |
+
```
|