Skip to content

vector-one/civicpulse-ml

 
 

Repository files navigation

CivicPulse ML API

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.

Features

  • 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

Tech Stack

  • Python
  • FastAPI
  • YOLOv8 / Detection Model
  • Tesseract / EasyOCR
  • OpenCV
  • Uvicorn

API Endpoints

Method Endpoint Description
POST /api/ocr/plate Detects license plate and extracts text
GET /health Service health check

Project Structure

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

Getting Started

1. Install dependencies

pip install -r requirements.txt

2. Run the API locally

uvicorn app.main:app --reload

3. Test OCR endpoint

curl -X POST -F "image=@car.jpg" http://localhost:8000/api/ocr/plate

Contributing

Feature branches and pull requests are welcome. Please follow the repository’s issue templates and branching guidelines.

License

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.

About

OCR pipeline for automatic identification in CivicPulse. WIP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dockerfile 85.2%
  • Python 14.8%