Instructions to use thangkt/PCB-Prune-YOLO-P20-Direct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use thangkt/PCB-Prune-YOLO-P20-Direct with ultralytics:
from ultralytics import YOLOvv8 model = YOLOvv8.from_pretrained("thangkt/PCB-Prune-YOLO-P20-Direct") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: agpl-3.0
|
| 3 |
+
library_name: ultralytics
|
| 4 |
+
pipeline_tag: object-detection
|
| 5 |
+
tags: [yolo, yolov8, depgraph, torch-pruning, structured-pruning, deeppcb]
|
| 6 |
+
datasets: [thangkt/PCB-Prune-YOLO-DeepPCB]
|
| 7 |
+
metrics: [map]
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# PCB-Prune-YOLO P20 Direct
|
| 11 |
+
|
| 12 |
+
Validation-selected YOLOv8n checkpoint produced by direct DepGraph structured
|
| 13 |
+
pruning followed by 50-epoch matched fine-tuning on DeepPCB. No sparse learning,
|
| 14 |
+
knowledge distillation, or test-set model selection was used.
|
| 15 |
+
|
| 16 |
+
| Precision | Recall | mAP50 | mAP50-95 |
|
| 17 |
+
|---:|---:|---:|---:|
|
| 18 |
+
| 0.96214 | 0.96186 | 0.98184 | 0.76710 |
|
| 19 |
+
|
| 20 |
+
The model has 1,913,971 parameters and 2.5722 GMACs, reductions of 36.46% and
|
| 21 |
+
36.85% from baseline. Its static batch-1 TensorRT FP16 engine reaches 1.933 ms
|
| 22 |
+
(517.45 FPS) on Tesla T4 with validation mAP50-95 0.76931.
|
| 23 |
+
|
| 24 |
+
Training used direct local group-magnitude pruning at ratio 0.20 without channel
|
| 25 |
+
rounding, followed by AdamW (`lr0=0.001`, `lrf=0.01`, weight decay 0.0005),
|
| 26 |
+
batch 64, patience 10, seed 42, AMP, and deterministic mode.
|
| 27 |
+
|
| 28 |
+
Structured pruning changes the architecture. Clone and install the
|
| 29 |
+
[project](https://github.com/pnthang04/PCB-Prune-YOLO) before loading:
|
| 30 |
+
|
| 31 |
+
```python
|
| 32 |
+
from ultralytics import YOLO
|
| 33 |
+
model = YOLO("best.pt")
|
| 34 |
+
results = model("pcb.jpg", imgsz=640)
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
New-process CUDA inference was verified with output `[1,10,8400]`.
|