Skip to content

Reno-03/valper-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VALPER Logo

VALPER System

Python Flutter Supabase OpenCV InsightFace Raspberry Pi

License: MIT Status Facebook

VALPER is an intelligent identification system built with Python for Raspberry Pi devices, featuring face recognition and license plate recognition (OCR) capabilities. The system uses Supabase for data management and includes a Flutter mobile application for user interaction.


πŸ“‹ Table of Contents

🎯 Overview

VALPER (Vehicle and Person Recognition) is a comprehensive thesis project that implements an intelligent identification system using computer vision and machine learning. The system combines face recognition and optical character recognition (OCR) technologies to identify and verify vehicles and individuals in real-time.

✨ Features

  • Face Recognition: Real-time face detection and recognition using InsightFace
  • License Plate Recognition: OCR-based license plate detection and validation
  • Multi-Device Architecture: Distributed system using Raspberry Pi 5 and Raspberry Pi Zero
  • Service Discovery: Automatic device discovery using ZeroConf
  • Database Integration: Supabase backend for data storage and management
  • Mobile Application: Flutter-based mobile app for system interaction (coming soon)

πŸ—οΈ System Architecture

VALPER System Architecture

The VALPER system consists of three main components:

  1. Raspberry Pi 5: Main processing unit handling face recognition, OCR, and license plate validation
  2. Raspberry Pi Zero: Camera server providing image capture functionality
  3. Flutter Mobile App: User interface for system interaction and management

πŸ“ Project Structure

valper-system/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ raspi_scripts/
β”‚   β”‚   β”œβ”€β”€ raspi_5/
β”‚   β”‚   β”‚   β”œβ”€β”€ valper_official_v1.py      # Main processing script
β”‚   β”‚   β”‚   β”œβ”€β”€ OCR_postprocessing_v3.py   # OCR validation and post-processing
β”‚   β”‚   β”‚   └── requirements.txt           # Python dependencies
β”‚   β”‚   └── raspi_zero/
β”‚   β”‚       β”œβ”€β”€ valper_pizero_v1.py        # Camera server script
β”‚   β”‚       └── requirements.txt           # Python dependencies
β”‚   └── valper_mobile_app/                 # Flutter mobile application (to be uploaded)
β”œβ”€β”€ VALPER_Finalized_compressed.pdf        # Thesis documentation
β”œβ”€β”€ LICENSE                                 # MIT License
└── README.md                               # This file

πŸ”§ Prerequisites

Hardware Requirements

  • Raspberry Pi 5 (main processing unit)
  • Raspberry Pi Zero (camera server)
  • Raspberry Pi Camera Module V2
  • MicroSD cards for both devices
  • Network connectivity (WiFi/Ethernet)

Software Requirements

  • Raspberry Pi OS (64-bit recommended)
  • Python 3.8 or higher
  • Flutter SDK (for mobile app development)
  • Supabase account and project

πŸ“¦ Installation

Raspberry Pi 5 Setup

  1. Clone the repository:
git clone <repository-url>
cd valper-system
  1. Navigate to the Raspberry Pi 5 scripts directory:
cd src/raspi_scripts/raspi_5
  1. Create a virtual environment (recommended):
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Install additional system dependencies:
sudo apt-get update
sudo apt-get install -y libgl1-mesa-glx libglib2.0-0

Raspberry Pi Zero Setup

  1. Navigate to the Raspberry Pi Zero scripts directory:
cd src/raspi_scripts/raspi_zero
  1. Create a virtual environment:
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt

βš™οΈ Configuration

Environment Variables

Create a .env file in the raspi_5 directory with the following variables:

SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_KEY=your_supabase_service_key

Model Files

Ensure the ONNX model file is placed at the specified path in valper_official_v1.py:

  • Default path: /home/user/my_pi_camera_project/VALPER Python/best.onnx

Camera Configuration

The system is configured to use:

  • Raspberry Pi Zero: Full resolution (3280x2464) with 16:9 crop to 1920x1080
  • Raspberry Pi 5: Processes images from Pi Zero via HTTP endpoint

πŸš€ Usage

Starting the Raspberry Pi Zero Camera Server

  1. SSH into your Raspberry Pi Zero
  2. Navigate to the script directory:
cd src/raspi_scripts/raspi_zero
  1. Activate the virtual environment:
source venv/bin/activate
  1. Run the camera server:
python valper_pizero_v1.py

The server will start on port 5003 and register itself via ZeroConf for automatic discovery.

Starting the Raspberry Pi 5 Main System

  1. SSH into your Raspberry Pi 5
  2. Navigate to the script directory:
cd src/raspi_scripts/raspi_5
  1. Activate the virtual environment:
source venv/bin/activate
  1. Run the main processing script:
python valper_official_v1.py

The system will:

  • Discover the Pi Zero camera server automatically
  • Initialize face recognition and OCR models
  • Begin processing captured images
  • Validate license plates against the database
  • Log results to Supabase

πŸ“± Mobile Application

The Flutter mobile application source code will be uploaded to src/valper_mobile_app/ directory. This application will provide:

  • User authentication and management
  • Real-time system status monitoring
  • Database query and management interface
  • Configuration and settings management

Note: The mobile application code is currently being prepared and will be added to this repository soon.

Flutter App Setup (Placeholder)

Once the Flutter source code is available:

  1. Navigate to the mobile app directory:
cd src/valper_mobile_app
  1. Install Flutter dependencies:
flutter pub get
  1. Run the application:
flutter run

🀝 Contributing

This is a thesis project. For questions or contributions, please contact the project maintainers.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Developed as part of a thesis project

About

VALPER: Real-time face recognition and license plate OCR system built with Raspberry Pi, Python, and Flutter.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages