This project showcases a lightweight and fast object detection pipeline using YOLOv8n β the smallest version of the Ultralytics YOLO family. It's ideal for real-time applications, experimentation, and learning purposes with small datasets like coco128.
- β Based on YOLOv8n β "n" stands for Nano (smallest, fastest model)
- β‘ Fast training and inference on low-resource machines
- ποΈ Uses
coco128, a small dataset subset for quick demo - π¦ Built with Ultralytics YOLO
- π Produces visual outputs (bounding boxes, metrics, logs)
YOLOv8n is the nano version of YOLOv8:
β
Smallest model in the YOLOv8 family
β
Designed for speed and low-latency inference
β
Ideal for mobile, embedded, and edge devices
This example uses the coco128 dataset β a mini version of MS COCO for testing and demos.
Install dependencies:
pip install ultralyticsfrom ultralytics import YOLO
model = YOLO('yolov8n.pt') # Nano versionresults = model.train(data='coco128.yaml', epochs=5, imgsz=640)results = model.predict(source='bus.jpg', conf=0.25)
for r in results:
r.show() # Display resultSample prediction on
bus.jpgusing YOLOv8n:
After training and prediction, results and logs are stored in:
runs/detect/train/
Including:
- Training loss curves
- mAP charts
- Confusion matrix
- Detected image samples
- Want to use your own dataset? Replace
coco128.yamlwith your custom.yamlconfig. - For even faster runs, lower
epochsor reduce image resolution withimgsz.
This project uses the Ultralytics YOLO License.
