Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model:
|
| 4 |
+
- Ultralytics/YOLO11
|
| 5 |
+
pipeline_tag: object-detection
|
| 6 |
+
tags:
|
| 7 |
+
- printed-circuit-boards
|
| 8 |
+
library_name: ultralytics
|
| 9 |
+
metrics:
|
| 10 |
+
- f1 - 93.8%
|
| 11 |
+
- mAP50 - 93.0%
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# PCB Detection
|
| 15 |
+
|
| 16 |
+
There are [a lot of models](https://universe.roboflow.com/roboflow-100/printed-circuit-board/model/3) for detecting components within a Printed Circuit Board (PCB), but not as many for detecting which pixels (if any) in an image contain the PCB itself. Being able to determine if and where a PCB is in an image is useful for [calculating its size to estimate carbon footprint]((https://github.com/SanderGi/LCA)), as a preprocessing step for detecting components, to limit the amount of image more expensive PCB defect detection models have to process, and more.
|
| 17 |
+
|
| 18 |
+
## Usage
|
| 19 |
+
|
| 20 |
+
1. Download [`the model weights`](https://huggingface.co/SanderGi/PCB-OBB/resolve/main/best.pt?download=true)
|
| 21 |
+
2. `pip install ultralytics`
|
| 22 |
+
3. Run the model with `yolo task=obb mode=predict model=[path to model weights] source=[path to test image]` from the terminal or with Python:
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
from ultralytics import YOLO
|
| 26 |
+
|
| 27 |
+
model = YOLO('[path to model weights]')
|
| 28 |
+
results = model.predict('[path/to/test/image.jpg]')
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
## Results
|
| 32 |
+
|
| 33 |
+
Dataset | Precision | Recall | F1 Score | mAP50 | mAP50-95
|
| 34 |
+
-----------|-----------|--------|----------|--------|---------
|
| 35 |
+
Training | 100.0% | 100.0% | 100.0% | 100.0% | 100.0%
|
| 36 |
+
Validation | 100.0% | 100.0% | 100.0% | 99.5% | 97.0%
|
| 37 |
+
Test | 100.0% | 88.4% | 93.8% | 93.0% | 91.2%
|
| 38 |
+
|
| 39 |
+
Sample predictions:
|
| 40 |
+

|