Skip to content

AimanRosman/ParkVision

Repository files navigation

ParkVision (Smart Parking & ANPR System)

Note

This project is a significant upgrade from the original design by Nur Aiman (see Poster.jpg). The previous flow used a basic ESP32-only setup for gate control. This version upgrades the architecture to use Raspberry Pi 5 with Direct ROI OCR for high-speed, intelligent ANPR and automated fee management.

Project Poster

Automatic Number Plate Recognition system using Direct Region of Interest (ROI) OCR. This simplified architecture removes the detection layer (YOLO) to provide faster, more deterministic reading performance on edge devices like the Raspberry Pi 5.

Features

  • 🎯 Direct ROI OCR using Tesseract (No YOLO overhead)
  • 🔤 Fast text extraction with localized reading zones
  • 🚧 Visual Reading Zone monitoring in real-time
  • 💾 SQLite database for storing detected plates
  • 🖼️ Auto-save plate images with timestamps
  • 📊 Statistics dashboard (press 's')
  • Optimized for Raspberry Pi 5 - 43% faster CPU inference

Quick Start

On Raspberry Pi 5

# 1. Run setup script
bash setup_pi5.sh

# 2. Activate environment
source anpr_env/bin/activate

# 3. Run ANPR
python main.py

On Windows (for testing)

# Install dependencies
pip install -r requirements.txt

# Install Tesseract OCR from: https://github.com/UB-Mannheim/tesseract/wiki

# Run
python main.py

Usage

Live Camera Mode

python main.py                    # Default camera (index 0)
python main.py --camera 1         # Specific camera

Single Image Mode

python main.py --image car.jpg

Export Database

python main.py --export plates.csv

GUI & Controls

The system features a clickable control bar at the bottom of the window:

Button Action
CAPTURE Save the current frame as an image
STATS Print database statistics to the terminal
QUIT Safely shut down the application

Keyboard Shortcuts

  • q: Alternative way to quit the application.

Project Structure

ANPR/
├── main.py            # Main application
├── plate_detector.py  # YOLOv26 detection
├── ocr_reader.py      # Tesseract OCR
├── database.py        # SQLite storage
├── config.py          # Configuration
├── requirements.txt   # Dependencies
├── setup_pi5.sh      # Pi 5 setup script
└── data/
    ├── plates.db     # Database
    └── plates/       # Saved images

Configuration

Edit config.py to customize:

  • Camera resolution
  • Confidence threshold
  • Display settings
  • Save options

Performance

Device Expected FPS
Raspberry Pi 5 3-5 FPS
Raspberry Pi 5 + Coral USB 14+ FPS
Desktop GPU 30+ FPS

License

MIT License

About

Automatic Number Plate Recognition using Computer Vision

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors