PCB Bare-Board Defect Detection (YOLO26s)

A YOLO26-based object detector that finds manufacturing defects on bare printed circuit boards β€” the inspection step before any components are placed: missing holes, mouse bites, open circuits, shorts, spurs, spurious copper, and pin holes.

Part of the PCB Inspection Suite. Trained on ParsaVictor/pcb-bare-board-defect-detection.

Metrics

Split mAP50 mAP50-95
val 0.895 0.601
test 0.928 0.617

Trained: YOLO26s, imgsz 1024, 80 epochs (best at epoch 17), online augmentation, close_mosaic scheduled.

Known weaknesses

  • short class recall is weaker (F1-optimal threshold β‰ˆ0.41, lower confidence than most classes)
  • open_circuit recall drops to ~70% at its F1-optimal threshold (0.77) β€” prefer the lower global threshold if recall matters more than precision for this class

Per-class confidence thresholds (F1-optimal on val)

Class Threshold
missing_hole 0.745
mouse_bite 0.484
open_circuit 0.770
short 0.406
spur 0.382
spurious_copper 0.330
pin_hole 0.571

A global fallback threshold of 0.465 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-bare-board-defect-detection-yolo26", "best.pt")
model = YOLO(weights)

results = model.predict("your_board_photo.jpg", conf=0.465)
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

License

Research/development use β€” see the dataset license. Contact the author before commercial use.

Downloads last month
41
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train ParsaVictor/pcb-bare-board-defect-detection-yolo26

Collection including ParsaVictor/pcb-bare-board-defect-detection-yolo26