Skip to content

MagicXuanTung/Yolov8-Detect-Vietnamese-license-plates-and-characters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup for project

  1. Install Python: https://www.python.org/
  2. Install Anaconda ( development environment): https://www.anaconda.com/download
  3. 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:

alt text

Start detection Color img :

alt text

Black and White:

alt text

Canny Edge Detection:

alt text

Find and Draw Contours:

alt text

Font text License plate Vietnamese:

text alt text

final_v0 (detect-character-by-model + final_result_by EASY OCR)

final_v1 (detect-character-by-model "character_detector.pt")

original_image: alt text

original_img got crop_detect: ( license_plate_detector.pt ) alt text

Image got detect and transform:

alt text

Final result:

alt text

Bonus:

  1. 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

  2. text this file to clean up all output images folder

About

Yolov8 Detect Vietnamese license plates and characters - easy thing easy life

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages