Setup for project
- Install Python: https://www.python.org/
- Install Anaconda ( development environment): https://www.anaconda.com/download
- Run install file requirements.txt (by Terminal on Project) Content inside file “requirements.txt”:
pip install -r requirements.txt
ultralytics==8.2.28 opencv-python==4.10.0 easyocr==1.7.1 numpy==1.24.4 Pillow==10.3.0 imutils==0.5.4
- ultralytics (The YOLO model is used to detect the location of objects in an image and return bounding boxes for each object)
- opencv-python (OpenCV is used to read, process and display images)
- easyocr (Use EasyOCR to read text on license plates)
- numpy (Used for numerical computations and data handling related to image processing, including array operations, linear algebra, etc)
- Pillow (Provides tools to open, manipulate, and save images, necessary for preprocessing images before license plate recognition)
- imutils (Provides convenient functions for image processing tasks like resizing, rotating, cropping, and other transformations)
• Detection license_plate_recognition_symbols
Preprocess.py:
Start detection Color img :
Black and White:
Canny Edge Detection:
Find and Draw Contours:
Font text License plate Vietnamese:
final_v0 (detect-character-by-model + final_result_by EASY OCR)
final_v1 (detect-character-by-model "character_detector.pt")
original_img got crop_detect: ( license_plate_detector.pt )
Image got detect and transform:
Final result:
Bonus:
-
You can delete all img in \input_images_license_plate , and replace your img in folder File rename_img.py in folder \img_input_rename , replace you input _path and output_path to rename img to manage it (ex: 1.jpg , 2.jpg) 1.jpg
-
text this file to clean up all output images folder