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.