Downloads · 30 days
85
27% of all-time downloads
Arshia82sbn/pcb-yolov8s-detection
pcb-yolov8s-detection is a object detection model from Arshia82sbn. Use it when you need objects located in an image. It is set up for ultralytics.
A fine-tuned YOLOv8s model for detecting 21 types of PCB (Printed Circuit Board) components. Trained for 90 epochs on a custom PCB dataset with 1,788 training images and 173 validation images.
Downloads · 30 days
85
27% of all-time downloads
All-time downloads
320
Public
Repo size
93 MB
Likes
0
Public
Click a slice to open those files.
.pt45.1 MB · 48%
From the Hugging Face model README
A fine-tuned YOLOv8s model for detecting 21 types of PCB (Printed Circuit Board) components. Trained for 90 epochs on a custom PCB dataset with 1,788 training images and 173 validation images.
| Property | Value |
|---|---|
| Model | YOLOv8s (small) |
| Task | Object Detection |
| Input Size | 640x640 |
| Classes | 21 PCB component types |
| Training Epochs | 90 |
| Optimizer | AdamW |
| Learning Rate | 0.01 |
| Batch Size | 8 |
| Seed | 42 |
| AMP | Enabled |
| Device | CUDA (GPU 0) |
| Metric | Value |
|---|---|
| Precision | 0.761 |
| Recall | 0.571 |
| [email protected] | 0.619 |
| [email protected]:0.95 | 0.400 |
| Class | [email protected] |
|---|---|
| relay | 0.984 |
| buzzer | 0.953 |
| display | 0.933 |
| ic | 0.801 |
| battery | 0.799 |
| switch | 0.788 |
| button | 0.860 |
| potentiometer | 0.700 |
| resistor | 0.635 |
| transistor | 0.629 |
| connector | 0.602 |
| capacitor | 0.587 |
| diode | 0.556 |
| clock | 0.561 |
| led | 0.523 |
| inductor | 0.384 |
| fuse | 0.339 |
| pads | 0.012 |
| pins | 0.119 |
| heatsink | 0.000 |
battery, button, buzzer, capacitor, clock, connector, diode, display, fuse, heatsink, ic, inductor, led, pads, pins, potentiometer, relay, resistor, switch, transformer, transistor
task: detect
model: yolov8s.pt
epochs: 90
imgsz: 640
batch: 8
lr0: 0.01
lrf: 0.01
momentum: 0.937
weight_decay: 0.0005
warmup_epochs: 3.0
optimizer: auto
seed: 42
deterministic: true
amp: true
augmentations:
hsv_h: 0.015
hsv_s: 0.7
hsv_v: 0.4
fliplr: 0.5
mosaic: 1.0
erasing: 0.4
pip install ultralytics
from ultralytics import YOLO
model = YOLO("best.pt")
results = model.predict("path/to/pcb_image.jpg", conf=0.25)
for result in results:
boxes = result.boxes
print(f"Detected {len(boxes)} objects")
for box in boxes:
cls = int(box.cls[0])
conf = float(box.conf[0])
xyxy = box.xyxy[0].tolist()
print(f" Class: {model.names[cls]}, Confidence: {conf:.3f}, Box: {xyxy}")
from ultralytics import YOLO
model = YOLO("best.pt")
model.export(format="onnx", imgsz=640, simplify=True)
| File | Description |
|---|---|
best.pt | Best model checkpoint (epoch 69) |
last.pt | Last epoch checkpoint |
best.onnx | ONNX exported model |
results.csv | Training metrics per epoch |
training_args.yaml | Full training configuration |
results.png | Training curves |
confusion_matrix.png | Confusion matrix |
confusion_matrix_normalized.png | Normalized confusion matrix |
BoxF1_curve.png | F1-Confidence curve |
BoxP_curve.png | Precision-Confidence curve |
BoxPR_curve.png | Precision-Recall curve |
BoxR_curve.png | Recall-Confidence curve |
labels.jpg | Label distribution |



This model was trained on the Detecting the PCB Object dataset from Roboflow Universe.
If you use this model, please cite:
@misc{pcb_object_detection_yolov8,
title={PCB Object Detection using YOLOv8s},
author={Arshia},
year={2026},
publisher={Hugging Face},
note={Fine-tuned YOLOv8s model for 21-class PCB component detection}
}
This model is released under the MIT License.