Downloads · 30 days
11
14% of all-time downloads
oborxel/noBSPCB
noBSPCB is a object detection model from oborxel. Use it when you need objects located in an image. It is set up for ultralytics. The card lists the license as mit.
This model is a modified YOLOv8n architecture with an additional Dropout layer (p=0.1) placed before the Detect head. It is designed for detecting 6 types of PCB defects: - missinghole - mousebite - opencircuit - shor…
Downloads · 30 days
11
14% of all-time downloads
All-time downloads
81
Public
Repo size
18.4 MB
Likes
1
Public
Click a slice to open those files.
.pt18.4 MB · 100%
From the Hugging Face model README
This model is a modified YOLOv8n architecture with an additional Dropout layer (p=0.1) placed before the Detect head. It is designed for detecting 6 types of PCB defects:
The model supports Monte Carlo Dropout (MCD) inference: running multiple forward passes with Dropout enabled to estimate epistemic uncertainty. The variance of confidence scores across passes indicates prediction reliability.
| Metric | Value |
|---|---|
| [email protected] | 0.978 |
| False Positives (on test set) | 30 |
| Recall | 0.987 |
| Inference time (CPU) | 31 ms (baseline) / 628 ms (MCD) |
The hybrid pipeline achieves 91.5% false positive reduction compared to baseline YOLOv8n.
from ultralytics import YOLO
model = YOLO("oborxel/noBSPCB")
results = model("path/to/pcb_image.jpg")
For uncertainty estimation, multiple passes are required:
from ultralytics import YOLO
import torch
import numpy as np
def enable_dropout(model):
for m in model.model.modules():
if isinstance(m, torch.nn.Dropout):
m.train()
model = YOLO("oborxel/noBSPCB")
model.model.eval()
enable_dropout(model.model)
num_passes = 30
all_confs = []
for _ in range(num_passes):
results = model("image.jpg", verbose=False)
if results[0].boxes is not None:
confs = results[0].boxes.conf.cpu().numpy()
all_confs.extend(confs)
variance = np.var(all_confs) if all_confs else 0.0
print(f"Uncertainty (variance): {variance:.4f}")
print(f"Verdict: {'defect' if variance < 0.02 else 'uncertain'}")
MIT
If you use this model in your work, please cite:
@software{noBSPCB,
author = {Chukhlov, Alexander},
title = {noBSPCB: PCB Defect Detection with Monte Carlo Dropout},
year = {2026},
url = {https://github.com/ex-alander/noBSPCB}
}