Skip to content

TRI-GATE is an AI-powered automated access control system for secure vehicle entry. It combines license plate recognition, vehicle classification, and facial verification using deep learning and computer vision to ensure only authorized drivers are granted access.

License

Notifications You must be signed in to change notification settings

QEC-Team/TRI-GATE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TRI-GATE Logo

TRI-GATE

TRI-GATE is an AI-powered vehicle gate access system designed to enhance security and efficiency. It leverages advanced machine learning and computer vision techniques to verify vehicles, license plates, and drivers in real-time, ensuring a seamless and secure access experience.


Features

  • License Plate Recognition:

    • Detects and authenticates license plates, including Saudi-specific formats.
  • Vehicle Classification:

    • Identifies vehicle make and model (e.g., Toyota Camry, Honda Accord, Ford Crown Victoria).
  • Facial Recognition:

    • Authenticates drivers using advanced facial recognition (InsightFace).
  • Real-Time Performance:

    • Provides fast and reliable detection and authentication.

Model Overview

Requirements:

  • Python3.9
  • tensorflow==2.16.1
  • torch==2.3.0
  • onnx==1.16.0
  • onnxruntime==1.17.3
  • opencv-python==4.9.0.80
  • scikit-image==0.23.2
  • albumentations==1.4.6
  • numpy==1.26.4
  • scipy==1.13.0
  • psycopg2-binary==2.9.9
  • matplotlib==3.8.4
  • insightface==0.7.3
  • rich==13.7.1
  • tqdm==4.66.4

How It Works:

  1. Captures video input or live stream to detect vehicles, license plates, and faces.
  2. Verifies the 3 features against a database.
  3. Opens the gate for verified entries.

Input Video

InputVideo.mp4

Output (Processed) Video

TRI-GATE Output (Processed) Video


Installation

  1. Clone the Repository:

    git clone https://github.com/QEC-Team/TRI-GATE.git
  2. Navigate to the Project Directory:

    cd TRI-GATE
  3. Install Dependencies:

    pip install -r requirements.txt

Retrain License Plate Model

  • License Plate Detection:

    • Gather your own dataset of images of cars that have license plates on them and put it into 'License_Plate_Detection_Dataset' folder

    • Label (rename) each image with the X and Y coordinates of the license plate, as shown in the image below.

    • Label images

    • Run 'MTCNN/data_set/preprocess.py' to split training data and validation data and put in "lpd_train" and "lpd_val" folders, respectively.

    • Run 'MTCNN/data_preprocessing/assemble_Pnet_imglist.py'

    • Run 'MTCNN/data_preprocessing/gen_Pnet_train_data.py'

    • Note: Repeat this process for Train and Validation.

    • Run 'MTCNN/train/Train_Pnet.py'

    • Run 'MTCNN/data_preprocessing/assemble_Onet_imglist.py'

    • Run 'MTCNN/data_preprocessing/get_Onet_train_data.py'

    • Note: Repeat this process for Train and Validation.

    • Run 'MTCNN/train/Train_Onet.py'

    • Collect pnet_Weights & onet_Weights and put them into the weights folder.

  • License Plate Recognition:

    • Gather your own dataset of images of pure license plates and put them in folder 'License_Plate_Recognition_Dataset'.
    • Image size must be 94X24.
    • Rename each image to the license plate characters (e.g., ABC1234.jpg).
    • Run 'LPRNet/data/preprocess.py' to prepare the dataset.
    • Run 'LPRNet/LPRNet_Train.py' for training.

Set Up the Database

  • Ensure PostgreSQL is installed and running.
  • Create a database using SQL (see Access_database.sql file for reference)
  psql -U <username> -c "CREATE DATABASE <database_name>;"
  • Execute the provided SQL file to initialize the database:
  psql -U <username> -d <database_name> -f database.sql
- `<username>`: Your PostgreSQL username.
- `<database_name>`: Desired database name.

Run the model

python3 main.py

Dataset Downloads

To use our prepared training datasets:

These folders are empty in the repository and must be downloaded separately due to size limits.


Contribution

Contributions are welcome! Follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed explanation.

Contact

For questions or suggestions, feel free to reach out to the project team:


License

This project is licensed under the MIT License.
See the LICENSE file for more details.

About

TRI-GATE is an AI-powered automated access control system for secure vehicle entry. It combines license plate recognition, vehicle classification, and facial verification using deep learning and computer vision to ensure only authorized drivers are granted access.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages