Skip to content

YOLO-Based System for Automatic Number Plate Recognition: A Punjab Safe Cities Authority In-house Research Initiative

Shamsher Haider Automatic-Number-Plate-Recognition YOLOv4 Punjab-Safe-Cities-Authority Traffic-Management Vehicle-Detection Deep-Learning Object-Detection Real-time-Processing Edge-Computing Smart-City-Initiatives

Abstract

This paper presents a research initiative undertaken by the Punjab Safe Cities Authority (PSCA) to address the challenges of recognizing vehicle number plates issued by the Punjab Excise Department. These plates, characterized by intricate designs, non-standard fonts, and varying formats, posed significant difficulties for the E-Challan System deployed by Huawei. The inefficiency of the existing Automatic Number Plate Recognition (ANPR) systems necessitated manual verification by Punjab Traffic Police wardens, undermining the system’s effectiveness.

To address these challenges, a team led by the Chief Software Development Officer of PSCA Shamsher Haider and supported by Umair Ayub, Syed Konain Abbas Kirmani, Syed Safeer Abbas , Ahsan Bilal and Muhammad Asad Ali, under the guidance of COO IGP Dr. Akbar Nasir Khan (and later by DIG Kamran Khan), developed pilot version of an advanced ANPR system tailored specifically for Punjab’s unique number plate designs. Leveraging the YOLOv4 deep learning model, the project achieved significant advancements in number plate detection and recognition, even under challenging conditions such as low light, rain, and partial occlusion.

Though this system was highly successful as a pilot deployed on Single Board Computers (Raspberry Pi and other ARM processor Linux machines) and some commodity Linux hardware at the PSCA Bigdata lab, a lot of work is needed to make it capable of handling high traffic volumes and images captured at high velocities. This research represents a critical step toward modernizing traffic enforcement and enhancing the efficiency of the E-Challan system in Punjab.


Introduction

The Punjab Safe Cities Authority (PSCA) has been at the forefront of deploying intelligent traffic management systems to ensure road safety and enforce traffic laws. However, the E-Challan System, implemented in collaboration with Huawei, faced significant challenges in recognizing vehicle number plates issued by the Punjab Excise Department. These plates deviate from international standards, featuring intricate designs, non-standard fonts, and varying formats, particularly for motorcycles. This issue was further exacerbated by environmental factors such as poor lighting, rain, and dust, which are common in Punjab.

Excise Punjab Number Plate with unusual fonts and design

The less than desired efficiency of the existing ANPR systems deployed by Huawei (not inefficient per se as per international standards but inefficient for convulated design of Punjab Excise Deptt number plates) necessitated manual intervention by Punjab Traffic Police wardens, who were tasked with verifying captured number plates for traffic violations. This manual process was labor-intensive, time-consuming, and prone to errors, undermining the overall efficiency of the E-Challan system. Recognizing the need for a robust solution, the PSCA launched several research projects to address this issue. One such project, led by Shamsher Haider and supported by a team of researchers, aimed to develop an advanced ANPR system tailored specifically for Punjab’s unique number plate designs.

This paper presents the findings of this research project, which utilized the YOLOv4 deep learning model to achieve state-of-the-art accuracy in number plate detection and recognition. The system was designed to handle the unique challenges posed by Punjab’s number plates and environmental conditions, providing a reliable and efficient solution for traffic enforcement.


Methodology

The research followed a structured approach to design and implement an ANPR system capable of recognizing Punjab’s unique number plates. The methodology involved three main phases:

1. Dataset Creation and Annotation

  • Dataset Collection: Over 2,000 images of Punjab number plates (cars and motorcycles) were collected from various PSCA-monitored locations under diverse conditions (daylight, night-time, rain, and partial occlusion).
  • Annotation: Images were annotated using LabelImg, creating bounding boxes around number plates and individual characters.
  • Augmentation: Simulated adverse conditions (e.g., poor lighting, motion blur, partial occlusion) were added to improve robustness.

2. Model Selection and Training

  • Model Selection: YOLO was chosen for its superior accuracy and speed, featuring CSPDarknet53, Mish activation functions, and spatial pyramid pooling (SPP).
  • Training: The model was trained on in house servers using high-performance GPUs specially acquired for machine learning projects. Hyperparameter tuning optimized performance, with metrics like mean average precision (mAP), precision, and recall monitored.

3. System Integration and Deployment

  • Architecture: A distributed system was implemented with Raspberry Pi devices for image capture and a high-performance big data cluster for processing.
  • Communication: A Flask-based API enabled seamless communication between edge devices and the server.
  • Performance: Real-time processing was achieved, with an average processing time of 200 milliseconds per image.


Results and Discussion

The developed ANPR system demonstrated strong performance in recognizing Punjab’s number plates, achieving an overall accuracy of 86.5%. The system’s robustness was validated under various environmental conditions, as shown in the table below:

Condition Accuracy (%)
Daylight, Clear Weather 86.5
Night-time 82.3
Rainy Conditions 80.1
Partial Occlusion 78.7

The system’s ability to maintain reasonable accuracy across diverse conditions highlights the effectiveness of the dataset enhancement techniques and the YOLOv4 model’s capabilities. However, the system’s performance under high traffic volumes and high-speed image capture remains a challenge. The integration of edge computing with server-side processing ensured real-time performance, but scalability issues need to be addressed for large-scale deployments.


Comparative Analysis

A comparison with existing ANPR systems revealed the superiority of the developed system in terms of accuracy and processing speed:

Study Model Accuracy (%) Processing Time
Existing E-Challan Huawei ANPR ~60 ~500 ms
Proposed System (PSCA) YOLOv4 86.5 200 ms

Challenges and Limitations

While the system demonstrated promising results, several challenges remain for large-scale deployment :

  1. High Traffic Volume: The current version of the system, tested on Raspberry Pi and commodity Linux hardware, struggles to process high volumes of traffic data in real-time. Scaling the system to handle thousands of vehicles per hour requires significant hardware and software optimization.

  2. High-Velocity Image Capture: Vehicles moving at high speeds generate motion blur, making it difficult to accurately detect and recognize number plates. Advanced motion deblurring techniques and faster image processing pipelines are needed.

  3. Big Data Challenges:

    • Data Storage: High-resolution images captured continuously generate massive amounts of data, requiring efficient storage and retrieval mechanisms.
    • Data Processing: Real-time processing of large datasets demands distributed computing frameworks and optimized algorithms.
    • Network Latency: Transmitting high-resolution images from edge devices to central servers can introduce latency, especially in high-traffic scenarios.
  4. Environmental Factors: Extreme weather conditions, such as fog, sandstorms, and heavy rain, further degrade system performance. Advanced image enhancement techniques are required to address these issues.


Conclusion

This research project successfully developed an advanced ANPR system tailored for Punjab’s unique number plates. The system’s accuracy and real-time performance represent a significant advancement in traffic enforcement technology. However, the pilot deployment revealed several limitations, particularly in handling high traffic volumes and high-speed image capture. Addressing these challenges is critical for scaling the system to meet the demands of large-scale traffic monitoring.

The findings of this research have important implications for the PSCA’s broader mission of enhancing road safety and enforcing traffic laws. The developed system can be integrated into the PSCA’s smart city initiatives, providing a scalable solution for traffic monitoring and enforcement.


Future Work

Future research could focus on:
Scalability: Optimizing the system for high traffic volumes and distributed deployments using big data frameworks like Apache Kafka and Spark.
High-Speed Image Processing: Developing advanced motion deblurring and tracking algorithms to handle high-velocity vehicles.
Edge Computing Enhancements: Improving edge device capabilities to reduce reliance on server-side processing and minimize latency.
Weather Robustness: Enhancing the system’s performance under extreme weather conditions, such as fog, sandstorms, and heavy rain.
Integration with Vehicle Analytics: Adding vehicle make, model, and color recognition for comprehensive traffic monitoring.
Cloud-Based Solutions: Leveraging cloud computing for scalable storage and processing of large datasets.
Migrate to YOLOv8 and Current Frameworks: Most of the project team is no longer working with PSCA, and there has apparently been no progress on this after the end of the year 2020. A lot has changed since then, and YOLOv8, along with more powerful machine learning libraries and hardware, presents a promising picture for achieving very high levels of accuracy for any future adaptations.

This project represents a critical step toward modernizing traffic enforcement in Punjab, aligning with the PSCA’s vision of a safer and smarter urban environment.