Sign inSign up

hn8888/yolo-light

By hn8888

•Updated 9 months ago

Tiny YOLO object detection API optimized for Raspberry Pi 4. FastAPI + Docker. Multi-arch

Image
Machine learning & AI
1

10K+

hn8888/yolo-light repository overview

ā šŸš€ Lightweight YOLO Object Detection API for Raspberry Pi 4

Real-time object detection API built with FastAPI and YOLOv5n, optimized for Raspberry Pi 4 and low-resource environments.

⁠✨ Key Features

  • ⚔ Ultralight: YOLOv5n model (7.5MB) with 80 COCO classes detection
  • šŸ—ļø Multi-Architecture: Supports amd64 and arm64 (Raspberry Pi 4+)
  • šŸ”§ Flexible Models: Easily switch between YOLOv5/YOLOv11 variants via MODEL_NAME environment variable
  • 🌐 REST API: 4 endpoints with JSON and visual output modes
  • šŸ’¾ Efficient: 800MB-1.2GB runtime memory on RPi4
  • 🐳 Docker Native: Automated GitHub Actions multi-architecture builds

ā šŸŽÆ Quick Start

docker run -d -p 8000:8000 --memory=1.5G hn8888/yolo-light:arm64 curl http://localhost:8000/health⁠

ā šŸ“š Endpoints

  • āœ… GET /health: API and model status
  • āœ… POST /detect: JSON response with detections
  • āœ… POST /detect-visual: PNG image with bounding boxes drawn
  • āœ… GET /: API information

ā šŸ”Ø Environment Variables

  • MODEL_NAME (default: yolov5n.pt): Choose any YOLO model
  • PORT (default: 8000): API port

ā šŸŽØ Available Models

yolov5n, yolov5s, yolov5m, yolov5l, yolov5x, yolov11n, yolov11s, yolov11m, yolov11l, yolov11x

ā šŸ“‹ Requirements

  • šŸ–„ļø Raspberry Pi 4 (2GB+ RAM recommended)
  • 🐳 Docker 20.10+
  • šŸ’æ 1.5-2GB disk space for image

ā šŸ“œ License

CC BY-NC 4.0 (Non-Commercial Use Only)

ā šŸ“– Documentation

For complete guides, deployment instructions, and examples, visit: https://github.com/hlavrencic/yolo-light⁠


šŸŽ‰ Optimized for RPi4 and low-power environments!

Tag summary

Content type

Image

Digest

sha256:a1a49855b…

Size

4.2 GB

Last updated

9 months ago

docker pull hn8888/yolo-light