Arshia82sbn/pcb-yolov8s-detection
063
PCB Object Detection - YOLOv8s
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.
Model Details
Performance Metrics (Epoch 69 - Best)
Per-Class mAP@0.5
21 PCB Classes
battery, button, buzzer, capacitor, clock, connector, diode, display, fuse, heatsink, ic, inductor, led, pads, pins, potentiometer, relay, resistor, switch, transformer, transistor
Training Configuration
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.4Usage
Installation
pip install ultralyticsInference
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}")Export to ONNX
from ultralytics import YOLO
model = YOLO("best.pt")
model.export(format="onnx", imgsz=640, simplify=True)Files
Training Results
Dataset
This model was trained on the Detecting the PCB Object dataset from Roboflow Universe.
- Training images: 1,788
- Validation images: 173
- Test images: Available
- Image size: 640x640
Citation
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}
}License
This model is released under the MIT License.
