The CivicPulse ML API is a lightweight machine learning microservice designed to process vehicle images and automatically extract license plate numbers using deep learning and OCR. This service powers the verification pipeline of the CivicPulse platform by providing fast, accurate, and API-accessible image analysis.
- Vehicle license plate detection using a deep learning model (YOLO-based)
- Optical Character Recognition (OCR) for extracting plate numbers
- REST API built with FastAPI
- Support for image uploads via file or URL
- Modular pipeline: preprocessing → detection → OCR → response
- Easy integration with the main CivicPulse backend
- Python
- FastAPI
- YOLOv8 / Detection Model
- Tesseract / EasyOCR
- OpenCV
- Uvicorn
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/ocr/plate |
Detects license plate and extracts text |
| GET | /health |
Service health check |
CIVICPULSE-ML-DEV/
├── .git/
├── .venv/ # local dev environment
│
├── models/ # model weights
│
├── src/ # source code
│ └── main.py
│
├── tests/ # unit tests folder
│
├── .dockerignore # required for docker builds
├── .gitignore
├── .python-version
├── Dockerfile # docker configuration file
│
├── LICENSE
├── pyproject.toml # uv dependency file
├── README.md
└── uv.lock
pip install -r requirements.txtuvicorn app.main:app --reloadcurl -X POST -F "image=@car.jpg" http://localhost:8000/api/ocr/plateFeature branches and pull requests are welcome. Please follow the repository’s issue templates and branching guidelines.
This project is part of the CivicPulse academic initiative formed by TIET students for their Software Engineering project. For usage outside the project's academic scope, please contact the maintainers.
© 2025 CivicPulse Team. All rights reserved.