Logo Lanfrica

sirineelayeb/tunisian-lpr-service

Domaine:

digital infrastructure

Type de record:

software
Créateur:
sir
Hôte:
License Plate Recognition microservice for Tunisian fleet management — FastAPI service that processes RTSP camera streams to detect and validate Tunisian license plates in real-time. # Tunisian LPR Service A License Plate Recognition (LPR) system designed for Tunisian vehicle plates. It detects and reads plate numbers from images or live RTSP camera streams using YOLOv8 and EasyOCR. This project is part of a fleet management platform and can be integrated into: - Parking systems - Security checkpoints - Access control gates --- ## Features - Real-time license plate detection using YOLOv8 (custom-trained model) - OCR recognition using EasyOCR (Arabic + Latin support) - Tunisian plate format validation (civilian, government, diplomatic, military, temporary, dealer) - RTSP live stream processing (async pipeline) - Contour-based fallback detection when YOLO fails - Duplicate detection & suppression (configurable cooldown + fuzzy matching) - REST API built with FastAPI - Structured logging for debugging and monitoring - Image testing endpoints for debugging models --- ## Tech Stack | Layer | Technology | |---|---| | Language | Python 3.11 | | API | FastAPI + Uvicorn | | Detection | YOLOv8 (Ultralytics) | | OCR | EasyOCR | | Vision | OpenCV (headless) | | HTTP client | HTTPX (async) | | Config | python-dotenv | --- ## Project Structure ``` tunisian-lpr-service/ ├── app/ │ ├── client/ │ │ └── backend_client.py # HTTP client for Node.js backend │ ├── detection/ │ │ ├── detector.py # YOLO + contour-based detection │ │ └── ocr.py # EasyOCR + Tunisian plate parser │ ├── streams/ │ │ └── processor.py # RTSP async stream pipeline │ ├── validation/ │ │ └── plate_validator.py # Tunisian plate format validation │ ├── config.py # Environment configuration │ └── main.py # FastAPI application entry point ├── models/ │ └── best.pt # Custom YOLO model (not tracked in git) ├── requirements.txt ├── .env # Local configuration (not committed) └── .gitignore ``` --- ## Getting Started ### 1. Clone the reposito …