Projects

Projects - Details

License Plate Detection and Recognition Pipeline

Real-Time ANPR with DeepStream, YOLOv5 & PaddleOCR


1. Objective

This project aims to develop a robust, real-time Automatic Number Plate Recognition (ANPR) system optimized for edge and GPU deployment. It integrates NVIDIA DeepStream 7.0, YOLOv5 for detection, and PaddleOCR for character recognition.

  • Accurately detect and recognize vehicle license plates from video streams or images.
  • Validate OCR outputs using regex rules specific to Indian number plate formats.
  • Store annotated frames, generate alerts, and push metadata to MongoDB and AWS S3.

2. Deployment Environment

ComponentSpecification
Operating SystemUbuntu 22.04
DeepStream SDKVersion 7.0
CUDA ToolkitVersion 12.2
cuDNNCompatible with CUDA 12.2
Python Version3.10
GPU HardwareNVIDIA RTX 4090

3. Installed Python Packages

  • pip install paddlepaddle_gpu-3.0.0.dev20250610-cp310-cp310-linux_x86_64.whl
  • pip install paddleocr==3.1.0.dev71+ga016e5ec9
  • pip install paddlex==3.0.1
  • 4. Pipeline Workflow

    • Input: Supports RTSP streams, image files, and video files.
    • YOLOv5: Detects license plates and assigns track IDs.
    • PaddleOCR: Extracts text from cropped plate regions. Discards low-confidence predictions.
    • Regex Processing: Normalizes and validates Indian plate formats.
    • Logging: Generates annotated images, CSV logs, and JSON alerts. Stores data in MongoDB/S3.

    5. Data Storage Structure

  • /Alerts
  • └── YYYY-MM-DD/
  • └── Camera_ID/
  • ├── frame__
  • ├── .csv
  • └── .json
  • 6. Core Functions

    • ocr_thread(): Runs OCR in separate threads.
    • alerts(): Validates plate formats and filters duplicates.
    • matchCount(): Avoids repeated alerts.
    • add_data_to_csv(): Logs to CSV, uploads to S3, inserts to MongoDB.
    • insert_data_anpr(): Checks DL, insurance, and vehicle registry.
    • UpdateAlert(): Maintains alert audit trail.

    7. Threaded OCR

    OCR runs in separate threads per detection to avoid blocking video stream performance.

    8. Security & Validation

    • Regex ensures only valid Indian plate formats are logged.
    • Tracks direction (IN/OUT) using Track IDs.
    • Handles blurry, partial, or confusing plate formats gracefully.

    9. Backend Integration

    • AWS S3: Stores annotated images, accessible via URL.
    • MongoDB: Stores alert metadata for analytics and filtering.
    • Local CSV and JSON provide offline access and auditing support.

    10. Use Cases

    • Automated gate access for warehouses/factories.
    • Timestamp-based vehicle tracking and alerting.

    11. Highlights

    • Regex boosts accuracy by ~20% by removing noise.
    • Multithreading keeps processing real-time.
    • Supports both 9- and 10-character plates.
    • Prevents duplicate alerts using Track ID logic.


    Data Warehouse System
    The problem of this project is that we have to design a scalable data warehouse system that contains various categories and classified image in that categories with no duplication and various different operation. Trained the model on more than 100k images for our data warehouse system and perform different operation on these images. Integrate the whole system in the pipeline and create a GUI and API for the user interface. The accuracy of the system is 99.38 %.
    Research paper used in AI-Model.
    1. VGG-16 Architecture | Source: Very Deep Convolutional Networks for Large-Scale Image Recognition
    2.Hashing Techniques | Source: Selecting a Hashing Algorithm
    2. Simialrity Algorithm | Source: An Online Algorithm for Large Scale Image Similarity Learning


    Recommender System
    The problem of this project is that we have to design a recommender system for male & female based on their dressing style and face shape etc. For this project, we have used the detection and classification model. Trained the model on the huge number of label images for our detection and classification model and perform different operation on these detected images. Integrate the whole system in the pipeline and create a GUI and API for the user interface.
    Research paper used in AI-Model.
    1. Object Detection | Source: You Only Look Once: Unified, Real-Time Object Detection
    2. Classification | Source: Rethinking the Inception Architecture for Computer Vision
    3. Clustering | Source: Application of k-Means Clustering algorithm for prediction of Students’ Academic Performance
    4. Recommender System (using Bi-Directional LSTM) | Source: Long Short-Term Memory Recurrent Neural Network Architectures for Large Scale Acoustic Modeling


    Monitor the Person Appearance
    Problem Statement: Monitor the person’s attendance. Associate the faces with the existing employee database to identify each employee record the time stamp and date for each employee recognized.
    Data-set : 100 hrs. Video footage for analysis and to build out model for monitor of person appearance.
    Output: The output of the analysis will be recorded in an csv file, which will record the person’s id and the his/her time stamp and date
    Research paper used in AI-Model.
    1. Object Detection | Source: SSD: Single Shot MultiBox Detector
    2. Face-Recognition | Source: FaceNet: A Unified Embedding for Face Recognition and Clustering
    3. Face-Tracking | Source: An Algorithm For Centroid-Based Tracking of Moving Objects