Skip to content

heidarimohsen92/ANPR_IR

Repository files navigation

ANPR_IR

Automatic Number Plate Recognition

Iranian Cars Number Plate

STEP_1: Plate Detection with YOLOV7

Run train_Yolov7.ipynb

Steps to download Kaggle datasets in Google Colab: https://www.kaggle.com/general/156610

Result train_Yolov7.ipynb:

P = 0.985 -- R = 0.992 -- [email protected] = 0.995 -- [email protected]:.95 = 0.779

Detect Plate:

01_plate_region

Crop Plate Region:

02_crop_region

STEP_2: OCR Plate Numbers with fasterrcnn_resnet50

Run tarin_ocr_fasterrcnn.ipynb

Install Detecto package for train fasterrcnn_resnet50:
pip install detecto

OCR Plate Numbers:

03_ocr_plate_numbers

ANPR: Yolov7_ANPR.py

Cloning Yolov7 repository in "/ANPR_IR/ANPR/" directory
pip install deep-sort-realtime
pip install detecto
change font path in "/yolov7-main/utils/plots.py/def plot_one_box_PIL()" like "/ANPR_IR/ANPR/plots.py"
Run Yolov7_ANPR.py

Test Image ANPR: get_plates_from_image(plate_image)

Test Video ANPR: get_plates_from_video(video_path)

Test Webcam ANPR: get_plates_from_webcam()

ANPR:

04_detected_plate

About

Automatic Number Plate Recognition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published