π Persian License Plate Recognition System (PLPR)
The Persian License Plate Recognition (PLPR) system is a sophisticated solution aimed at detecting and identifying Persian license plates in images and video streams. By utilizing cutting-edge deep learning models and a straightforward user interface, this system offers dependable performance in various situations.
π Overview
The main objective of this system is to address the specific challenges involved in detecting and recognizing Persian license plates, providing high levels of accuracy and efficiency. It is ideal for implementations in traffic monitoring, automated vehicle identification, and related areas.
β¨ Key Features
- Advanced Detection: Employs YOLOv5 models for accurate identification of license plates.
- Persian Character Recognition: Specially trained models ensure exact recognition of Persian characters.
- Real-Time Processing: Capable of processing live video streams instantaneously.
- User-Friendly GUI: An intuitive graphical user interface simplifies engagement with the system.
Main GUI Explanation
- 1 Input View: Displays video or camera feed.
- 2 Detected Plate Highlight: Highlights detected plates with a rectangle.
- 3 Plate Image Display: Shows the captured image of the detected plate.
- 4 Extracted Text: Presents the text recognized from the plate image.
- 5 Owner Name: Displays the registered owner's name.
- 6 Plate Status: Indicates if the plate is allowed, not allowed, or unregistered.
- 7 Recent Entries Table: Lists the last 10 entries with options to add non-registered plates or view owner info.
Resident Management
Manages and updates resident vehicle information, controls permissions for entry, and monitors resident vehicle movements within a complex.
Entrance Management
Regulates vehicle access, ensuring that only authorized vehicles are permitted entry and maintains a record of all vehicle movements for security and administrative needs.
Main Flowchart Explanation
- Start: Initializes the system.
- Input Feed: Accepts image/video stream.
- Detect Plate: YOLOv5 identifies license plates.
- Character Recognition: Custom model recognizes Persian characters.
- Database Check: Cross-references the plate with a database for status and owner information.
- Display Results: Outputs detection and recognition results via the GUI.
- Log Entry: Updates recent entries table and database.
- End/Repeat: Continues with new input or ends operation.
π» System Hardware Requirements
To achieve optimal performance, the following hardware is recommended:
- Processor: Intel Core i5 (8th Gen) or better.
- Memory: At least 8 GB RAM.
- Graphics: Dedicated GPU (e.g., NVIDIA GTX 1060) with a minimum of 4 GB VRAM.
- Storage: SSD with at least 20 GB of free space.
- Operating System: Compatible with Windows 10/11, Linux (Ubuntu 18.04+), macOS (10.14+).
π Getting Started
π§ Installation
-
Clone the repository:
git clone https://github.com/mtkarimi/smart-resident-guard.git cd smart-resident-guard
-
Install the necessary Python packages:
pip install -r requirements.txt
π Video Source Configuration
To change the video source, adjust the cv2.VideoCapture(0)
parameter in your code, where 0
is the default webcam. For a specific video file, change this to params.video
in the config.ini
, like setting video = anpr_video.mp4
. For live streams, use the stream address in the config.ini
.
βΆοΈ Running the Application
Start the application using:
python home-yolo.py
π οΈ Usage
The GUI enables users to upload and process images or video streams, showing detected license plates and the corresponding text. Users can adjust parameters for better performance.
π Learn More in the Wiki
For detailed information on the PLPR system's structure, training models, and advanced usage, see the Wiki.
π Additional Academic Resources
The pdf-research
directory contains research papers and articles on LPR (License Plate Recognition) technologies, providing insights into system techniques and algorithms.
π Special Thanks
A huge thanks to the open-source community and the projects that made this possible, including:
- YOLOv5 and PyTorch for the fundamental detection and recognition models.
- PySide6 and OpenCV for the interface and image processing.
- Pillow for enhanced image manipulation.
π¦ Repositories Used
π Acknowledgments
The PLPR system stands on the shoulders of giants in the AI and open-source communities. Their shared knowledge and tools were invaluable.
π License
This project is licensed under GPL-3.0. See the LICENSE file for details, including:
- Sharing source code if distributing binaries or modified versions.
- Maintaining the GPL-3 license on modifications.
- Stating modifications if applicable.
π Clarification on Contributions and Usage
PLPR reflects the collaborative nature of the open-source community. Special acknowledgments to Mahdi Rahmani, Meftun AKARSU for their indirect contributions, along with datasets like IR-LPR and Iranis-dataset.
This project urges openness and exchange of information. Queries about the use of contributions are welcome, promoting ongoing learning and collaboration within the community.