Patryk Szlagowski commited on
Commit
d8f686f
·
1 Parent(s): e121a44
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ML License Plate Vision
2
+ ## Overview
3
+ ML License Plate Vision is a Python-based solution for detecting and reading license plates in images. It utilizes advanced machine learning techniques and OCR (Optical Character Recognition) to accurately identify and extract license plate information from a given image.
4
+
5
+ ## How it works
6
+
7
+ The whole process consist of three steps:
8
+ 1. recognizing the license plate in the image
9
+ 2. cropping the image to the license plate area, enhancing the image in order to be more readable for OCR
10
+ 3. reading the license plate from the cropped image with the OCR mechanisms
11
+
12
+ The demo implementation uses two ways of reading license plates:
13
+ - Tesseract OCR
14
+ - Microsoft/TrOCR
15
+
16
+ ## Installation
17
+ To use ML License Plate Vision, you need to have Python installed on your system. Clone the repository and install the required dependencies:
18
+
19
+ ```bash
20
+ $ git clone https://github.com/Modevntalking-com/ml-license-plate-vision.git
21
+ $ cd ml-license-plate-vision
22
+ $ pip install -r requirements.txt
23
+ ```
24
+
25
+ ## Usage
26
+ To detect and read license plates in an image, run the detect.py script with the image URL as an argument:
27
+
28
+ ```bash
29
+ $ python ./detect.py -i [IMAGE_URL]
30
+ ```
31
+
32
+ For example:
33
+
34
+ ```bash
35
+ $ python ./detect.py -i https://modevntalking.pl/wp-content/uploads/2023/11/IMG_5513-scaled.jpeg
36
+ ```
37
+ Example Output
38
+ Running the above command will produce the following output:
39
+
40
+ ```plain
41
+ detecting license plate from image: https://modevntalking.pl/wp-content/uploads/2023/11/IMG_5513-scaled.jpeg
42
+ license plate trocr: GA 250HW
43
+ license plate tesseract: GA250HW
44
+ ```
45
+
46
+ based on the photo of a car:
47
+
48
+ ![car](./example/car-with-license-plate.jpeg)
49
+
50
+ Which will be processed - the license plate will be detected, cropped, enhanced and used:
51
+
52
+ ![license plate](./example/enhanced-license-plate.png)
53
+
54
+ ## Summary
55
+ The blog post about this project is available at [https://modevntalking.com/2023/11/23/ai-ml-vision-license-plate-recognition/](https://modevntalking.com/2023/11/23/ai-ml-vision-license-plate-recognition//).
example/car-with-license-plate.jpeg ADDED
example/enhanced-license-plate.png ADDED