PCB Solder & Assembly Defect Detection (YOLO26m)
A YOLO26-based object detector that finds soldering and assembly defects on populated PCBs: solder bridges, insufficient/excess solder, voids, missing or shifted components, burns, physical damage, and oxidation.
Part of the PCB Inspection Suite. Trained on ParsaVictor/pcb-solder-defect-detection.
Metrics
| Split | mAP50 | mAP50-95 |
|---|---|---|
| val | 0.905 | 0.647 |
| test | 0.895 | 0.657 |
Trained: YOLO26m, imgsz 800, 150 epochs (best at epoch 143), AdamW with a tuned low learning rate, extra augmentation (noise/motion-blur/JPEG) and an automatic rollback guard against training spikes.
Known weaknesses
solder_voidis frequently confused withinsufficient_solder(~71% of void mistakes land there) — review both classes together on any flagged boardburnrecall is lower (~62%) — the class has the fewest training examples (513 instances)- Performance drops on very dark/low-light photos from one of the source subsets
Per-class confidence thresholds (F1-optimal on val)
| Class | Threshold |
|---|---|
| insufficient_solder | 0.297 |
| excess_solder | 0.349 |
| solder_bridge | 0.417 |
| solder_void | 0.249 |
| missing_component | 0.381 |
| shifted_component | 0.389 |
| burn | 0.224 |
| physical_damage | 0.214 |
| oxidation | 0.228 |
A global fallback threshold of 0.228 is used for any class with too few validation examples to tune individually.
Usage
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
weights = hf_hub_download("ParsaVictor/pcb-solder-defect-detection-yolo26", "best.pt")
model = YOLO(weights)
results = model.predict("your_board_photo.jpg", conf=0.228)
results[0].show()
For best accuracy, apply the per-class thresholds above instead of one global confidence value — see thresholds.json in this repo.
Related
- Training dataset: pcb-solder-defect-detection
- Sibling model: pcb-bare-board-defect-detection-yolo26
- Full suite overview: pcb-inspection-suite
License
Research/development use — see the dataset license. Contact the author before commercial use.