Skip to content

Commit 06a13d6

Browse files
authored
Update README.md
1 parent 9859d9a commit 06a13d6

File tree

1 file changed

+137
-26
lines changed

1 file changed

+137
-26
lines changed

README.md

+137-26
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88
#### 📚 Product & Resources - [Here](https://github.com/kby-ai/Product)
99
#### 🛟 Help Center - [Here](https://docs.kby-ai.com)
1010
#### 💼 KYC Verification Demo - [Here](https://github.com/kby-ai/KYC-Verification-Demo-Android)
11-
#### 🙋‍♀️ Docker Hub - [Here](https://hub.docker.com/u/kbyai)
11+
#### 🙋‍♀️ Docker Hub - [Here](https://hub.docker.com/r/kbyai/license-plate-recognition)
1212

1313
# Automatic-License-Plate-Recognition
1414

1515
## Overview
1616

17-
We implemented `ANPR/ALPR(Automatic Number/License Plate Recognition)` engine with unmatched accuracy and precision by applying `SOTA(State-of-the-art)` deep learning techniques in this repository.
18-
This repository demonstrates `ANPR/ALPR` model inference in `Linux` server.
19-
20-
KBY-AI's `LPR` solutions utilizes artificial intelligence and machine learning to greatly surpass legacy solutions. Now, in real-time, users can receive a vehicle's plate number.
21-
17+
This repository demonstrates `ANPR/ALPR(Automatic Number/License Plate Recognition)` SDK with unmatched accuracy and precision by applying `SOTA(State-of-the-art)` deep learning techniques. </br>
18+
`KBY-AI`'s `LPR` solutions utilizes artificial intelligence and machine learning to greatly surpass legacy solutions. Now, in real-time, users can receive a vehicle's plate number through `API`.
19+
> We can customize the `SDK` to align with customer's specific requirements.
20+
>
2221
The `ALPR` system consists of the following steps:
2322
- Vehicle image capture
2423
- Preprocessing
@@ -29,35 +28,147 @@ The `ALPR` system consists of the following steps:
2928

3029
The `ALPR` system works in these strides, the initial step is the location of the vehicle and capturing a vehicle image of front or back perspective of the vehicle, the second step is the localization of Number Plate and then extraction of vehicle Number Plate is an image. The final stride uses image segmentation strategy, for the segmentation a few techniques neural network, mathematical morphology, color analysis and histogram analysis. Segmentation is for individual character recognition. Optical Character Recognition (OCR) is one of the strategies to perceive the every character with the assistance of database stored for separate alphanumeric character.
3130

32-
## Online Test Demo
33-
To try `KBY-AI` `ALPR` online, please visit [here](https://web.kby-ai.com/)
3431

35-
## Model Weights
32+
### ◾License Plate Recognition SDK Product List
33+
| No. | Repository | SDK Details | Status |
34+
|------------------|------------------|------------------|------------------|
35+
| ➡️ | <b>[LPR - Linux](https://github.com/kby-ai/Automatic-License-Plate-Recognition-Docker)</b> | <b>License Plate Recognition Linux SDK</b> | <b>Available</b> |
36+
| 2 | [LPR - Docker](https://hub.docker.com/r/kbyai/license-plate-recognition) | License Plate Recognition Docker Image | Available |
37+
| 3 | [LPR - Flutter](https://github.com/kby-ai/Automatic-License-Plate-Recognition-Flutter) | License Plate Recognition Flutter SDK | Available |
38+
| 4 | LPR - Android | License Plate Recognition Android SDK | Developing |
39+
| 5 | LPR - iOS | License Plate Recognition iOS SDK | Developing |
3640

37-
To run this repository, model weights are needed.
41+
> To get more products, please visit products [here](https://github.com/kby-ai):<br/>
3842
39-
- To request model weights, please contact us:</br>
43+
## Try the API
44+
### Online Demo
45+
To try `KBY-AI` `ALPR` online, please visit [here](https://web.kby-ai.com/)
46+
> Please select tab 'ALPR/ANPR` for this `SDK`
47+
48+
![image](https://github.com/user-attachments/assets/4e660694-f5bf-4f00-be2b-822c093e2d94)
49+
50+
### Postman
51+
The `API` can be evaluated through `Postman` tool. Here are the endpoints for testing:
52+
- Test with an image file: Send a `POST` request to `http://89.116.159.229:8084/compare_palmprint`.
53+
- Test with a `base64-encoded` image: Send a `POST` request to `http://89.116.159.229:8084/compare_palmprint_base64`.
54+
55+
![image](https://github.com/user-attachments/assets/4c5a528d-572c-46fe-b2de-6f387929b181)
56+
57+
## SDK License
58+
This project demonstrates `KBY-AI`'s `Palmprint Recognition Server SDK`, which requires a license per machine.</br>
59+
- The code below shows how to use the license: https://github.com/kby-ai/Palmprint-Recognition-Docker/blob/290f714ca49496164f0586f277b6104bfd164ad7/app.py#L21-L31
60+
- To request the license, please provide us with the `machine code` obtained from the `getMachineCode` function.</br>
61+
#### Please contact us:</br>
4062
🧙`Email:` [email protected]</br>
4163
🧙`Telegram:` [@kbyai](https://t.me/kbyai)</br>
4264
🧙`WhatsApp:` [+19092802609](https://wa.me/+19092802609)</br>
4365
🧙`Skype:` [live:.cid.66e2522354b1049b](https://join.skype.com/invite/OffY2r1NUFev)</br>
4466
🧙`Facebook:` https://www.facebook.com/KBYAI</br>
4567

46-
## About Repository
47-
48-
### 1. Set up
49-
1. Clone this repository to local or server machine.
50-
51-
2. Install `python 3.9` or later version
52-
53-
3. Install dependencies using `pip` command
54-
```bash
55-
pip install tensorflow
56-
```
57-
4. Run inference
58-
```bash
59-
python main.py
60-
```
68+
## How to run
69+
70+
### 1. System Requirements
71+
- `CPU`: 2 cores or more (Recommended: 2 cores)
72+
- `RAM`: 4 GB or more (Recommended: 8 GB)
73+
- `HDD`: 4 GB or more (Recommended: 8 GB)
74+
- `OS`: `Ubuntu 20.04` or later
75+
- Dependency: `OpenVINO™ Runtime` (Version: 2022.3)
76+
77+
### 2. Setup and Test
78+
- Clone the project:
79+
```bash
80+
git clone https://github.com/kby-ai/Automatic-License-Plate-Recognition-Docker.git
81+
```
82+
```bash
83+
cd Automatic-License-Plate-Recognition-Docker
84+
```
85+
- Build the `Docker` image:
86+
```bash
87+
sudo docker build --pull --rm -f Dockerfile -t kby-ai-alpr:latest .
88+
```
89+
- Run the `Docker` container:
90+
```bash
91+
sudo docker run -v ./license.txt:/home/openvino/kby-ai-alpr/license.txt -p 8081:8080 -p 9001:9000 kby-ai-alpr
92+
```
93+
- Send us the `machine code` and then we will give you a license key to make the `SDK` activate.
94+
95+
After that, update the `license.txt` file by overwriting the `license key` that you received. Then, run the `Docker` container again.
96+
97+
![image](https://github.com/user-attachments/assets/08865793-ee4e-4ede-aaf1-8fa70a8d8faa)
98+
99+
![image](https://github.com/user-attachments/assets/194b8666-8638-4ffc-8ee3-63f2ba491763)
100+
101+
- Here are the endpoints to test the `API` through `Postman`:
102+
103+
Test with an image file: Send a `POST` request to `http://{xx.xx.xx.xx}:8081/alpr`.
104+
105+
Test with a `base64-encoded` image: Send a `POST` request to `http://{xx.xx.xx.xx}:8081/alpr_base64`.
106+
107+
### 3. Execute the Gradio demo
108+
- Setup `Gradio`
109+
Ensure that the necessary dependencies are installed. </br>
110+
`Gradio` requires `Python 3.6` or above. </br>
111+
Install `Gradio` using `pip` by running the following command:
112+
```bash
113+
pip install gradio
114+
```
115+
- Run the demo with the following command:
116+
```bash
117+
cd gradio
118+
python demo.py
119+
```
120+
- `SDK` can be tested on the following URL: `http://127.0.0.1:9000`
121+
122+
## About SDK
123+
124+
### 1. Initializing the SDK
125+
126+
- Import SDK python script
127+
```python
128+
from alprsdk import initSDK, getLicensePlate, getMachineCode, freeLicenseResults, setActivation
129+
```
130+
- Obtain the `machine code` to activate and request a license
131+
```python
132+
machineCode = getMachineCode()
133+
print("\nmachineCode: ", machineCode.decode('utf-8'))
134+
```
135+
- Activate the `SDK` using the license key
136+
```python
137+
ret = setActivation(license.encode('utf-8'))
138+
print("\nactivation: ", ret)
139+
```
140+
- Initializing `SDK`
141+
```python
142+
ret = initSDK()
143+
```
144+
Once `ret` value is zero, SDK can get work started
145+
146+
### 2. APIs
147+
- Hand Detection
148+
149+
The `SDK` provides a single API for detecting hands, determining `hand landmark`.</br>
150+
The function can be used as follows:
151+
```python
152+
hand_type, x1, y1, x2, y2, detect_state = encoder.detect_using_bytes(img)
153+
roi = mat_to_bytes(get_roi(img, hand_type, x1, y1, x2, y2))
154+
```
155+
* `hand_type`: it indicates hand type value, `0` value: `left hand`, `1` value: `right hand`.
156+
* `x1`, `y1`, `x2`, `y2`: hand landmark points to get `ROI` image.
157+
* `roi`: hand `ROI(Region Of Interest)` image to get palm feature.
158+
- Create Feature
159+
`encode_using_bytes` function returns palmprint feature against `ROI` data.</br>
160+
```python
161+
palmprint = encoder.encode_using_bytes(roi)
162+
```
163+
* `roi`: hand `ROI(Region Of Interest)` image to get palm feature.
164+
* `palmprint`: palmprint feature calculated from hand `ROI` data.
165+
- Similiarity
166+
The `compare_to` function takes two palmprint `feature`s as a parameter and returns `score` value to determine whether 2 input hands are from the same or different.
167+
```python
168+
one_palmprint_code = encoder.encode_using_bytes(roi1)
169+
another_palmprint_code = encoder.encode_using_bytes(roi2)
170+
score = one_palmprint_code.compare_to(another_palmprint_code)
171+
```
61172
### 2. Performance Video
62173

63174
You can visit our YouTube video for `ANPR/ALPR` model's performance [here](https://www.youtube.com/watch?v=sLBYxgMdXlA) to see how well our demo app works.</br></br>

0 commit comments

Comments
 (0)