File size: 2,683 Bytes
4532ed0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5d45623
 
 
 
 
 
 
 
 
 
4532ed0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
task_categories:
- object-detection
tags:
- pcb
- electronics
- yolo
- component-detection
pretty_name: PCB Components Labelled
---

# PCB Components Labelled

YOLO-format object detection datasets and trained weights for detecting electronic
components on PCB (printed circuit board) images. Two dataset/model pairs are
included, covering a coarse 5-class label set and a fine-grained 17-class label set.

## Contents

```
pcb_final_v4/                  17-class dataset (train/valid, YOLO format)
pcb_5class_tiled/               5-class dataset, tiled images (train/valid, YOLO format)
models/17_class_pcb_v5_safe/    best.pt trained on pcb_final_v4
models/5_class_pcb_5class_v1/   best.pt trained on pcb_5class_tiled
```

## Dataset: `pcb_final_v4` (17 classes)

`data.yaml`:
```
nc: 17
names: ['IC', 'capacitor', 'connector', 'crystal_oscillator', 'diode', 'ferrite_bead',
        'fuse', 'inductor', 'led', 'resistor', 'switch', 'transistor', 'button', 'em',
        'pins', 'pads', 'test_point']
```

## Dataset: `pcb_5class_tiled` (5 classes)

`data.yaml`:
```
names:
  0: resistor
  1: capacitor
  2: ic
  3: led
  4: diode
```
Images are tiled crops (higher resolution training strategy), which is why this
dataset has far more files than `pcb_final_v4` despite covering fewer classes.

**Note: this dataset is only partially uploaded (~40%).** The full local dataset
has 27,274 train images / 13,637 train labels / 6,934 valid images / 3,467 valid
labels (~51k files, ~22.5 GB). `train/images` and `train/labels` both exceed the
Hugging Face Hub's 10,000-files-per-directory git limit, which blocked further
uploads once each hit its cap (currently ~9,989 and ~9,999 files committed
respectively). `valid/images` and `valid/labels` are under the limit but were not
yet fully uploaded either. The `5_class_pcb_5class_v1` model below was trained on
the complete local dataset, not this partial upload — the model's reported metrics
still apply in full.

## Models

Both are Ultralytics YOLO checkpoints (`best.pt`), trained for 150/150 epochs.

| Model | Dataset | Classes | mAP50 | mAP50-95 | Precision | Recall |
|---|---|---|---|---|---|---|
| `models/17_class_pcb_v5_safe/best.pt` | pcb_final_v4 | 17 | 0.709 | 0.511 | 0.736 | 0.683 |
| `models/5_class_pcb_5class_v1/best.pt` | pcb_5class_tiled | 5 | 0.857 | 0.565 | 0.854 | 0.780 |

`args.yaml` and `results.csv` from the corresponding training run are included
alongside each `best.pt` for reproducibility.

## Usage

```python
from ultralytics import YOLO

model = YOLO("models/17_class_pcb_v5_safe/best.pt")
results = model.predict("your_pcb_image.jpg")
```

## License

Not yet specified by the dataset owner.