Skip to content

Commit ddf1f03

Browse files
authored
Update README.md
1 parent 06bdbd4 commit ddf1f03

File tree

1 file changed

+11
-62
lines changed

1 file changed

+11
-62
lines changed

README.md

Lines changed: 11 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -107,22 +107,18 @@ This project demonstrates `KBY-AI`'s `Palmprint Recognition Server SDK`, which r
107107

108108
### 3. Execute the Gradio demo
109109
- Setup `Gradio`
110-
Ensure that you have the necessary dependencies installed.
111-
112-
`Gradio` requires `Python 3.6` or above.
113-
114-
You can install `Gradio` using `pip` by running the following command:
110+
Ensure that the necessary dependencies are installed. </br>
111+
`Gradio` requires `Python 3.6` or above. </br>
112+
Install `Gradio` using `pip` by running the following command:
115113
```bash
116114
pip install gradio
117115
```
118-
- Run the demo
119-
Run it using the following command:
116+
- Run the demo with the following command:
120117
```bash
121118
cd gradio
122119
python demo.py
123120
```
124-
- `SDK` can be tested on the following URL:
125-
`http://127.0.0.1:9000`
121+
- `SDK` can be tested on the following URL: `http://127.0.0.1:9000`
126122

127123
## About SDK
128124

@@ -134,70 +130,23 @@ This project demonstrates `KBY-AI`'s `Palmprint Recognition Server SDK`, which r
134130
```
135131
- Create new object for using `SDK`
136132
```python
137-
config = handtool.EncoderConfig(29, 5, 5, 10)
133+
config = handtool.EncoderConfig()
138134
encoder = handtool.create_encoder(config)
139135
```
140136
- Obtain the `machine code` to activate and request a license
141137
```python
142138
machineCode = encoder.getMachineCode()
143139
print("\nmachineCode: ", machineCode.decode('utf-8'))
144140
```
145-
146-
- Step Two
147-
148-
Next, activate the SDK using the received license.
141+
- Activate the `SDK` using the license key
149142
```python
150-
setActivation(license.encode('utf-8'))
143+
ret = encoder.setActivation(license.encode('utf-8'))
144+
print("\nactivation: ", ret)
151145
```
152-
If activation is successful, the return value will be `SDK_SUCCESS`. Otherwise, an error value will be returned.
153-
154-
- Step Three
155-
156-
After activation, call the initialization function of the SDK.
157-
```python
158-
initSDK("data".encode('utf-8'))
159-
```
160-
The first parameter is the path to the model.
161-
162-
If initialization is successful, the return value will be `SDK_SUCCESS`. Otherwise, an error value will be returned.
163-
164-
### 2. Enum and Structure
165-
- SDK_ERROR
166-
167-
This enumeration represents the return value of the `initSDK` and `setActivation` functions.
168-
169-
| Feature| Value | Name |
170-
|------------------|------------------|------------------|
171-
| Successful activation or initialization | 0 | SDK_SUCCESS |
172-
| License key error | -1 | SDK_LICENSE_KEY_ERROR |
173-
| AppID error (Not used in Server SDK) | -2 | SDK_LICENSE_APPID_ERROR |
174-
| License expiration | -3 | SDK_LICENSE_EXPIRED |
175-
| Not activated | -4 | SDK_NO_ACTIVATED |
176-
| Failed to initialize SDK | -5 | SDK_INIT_ERROR |
177-
178-
- FaceBox
179-
180-
This structure represents the output of the face detection function.
181-
182-
| Feature| Type | Name |
183-
|------------------|------------------|------------------|
184-
| Face rectangle | int | x1, y1, x2, y2 |
185-
| Face angles (-45 ~ 45) | float | yaw, roll, pitch |
186-
| Face quality (0 ~ 1) | float | face_quality |
187-
| Face luminance (0 ~ 255) | float | face_luminance |
188-
| Eye distance (pixels) | float | eye_dist |
189-
| Eye closure (0 ~ 1) | float | left_eye_closed, right_eye_closed |
190-
| Face occlusion (0 ~ 1) | float | face_occlusion |
191-
| Mouth opening (0 ~ 1) | float | mouth_opened |
192-
| 68 points facial landmark | float [68 * 2] | landmarks_68 |
193-
| Face templates | unsigned char [2048] | templates |
194-
195-
> 68 points facial landmark
196-
197-
<img src="https://user-images.githubusercontent.com/125717930/235560305-ee1b6a39-5dab-4832-a214-732c379cabfd.png" width=500/>
146+
Once `ret` value is zero, SDK can get work started
198147

199148
### 3. APIs
200-
- Face Detection
149+
- Hand Detection
201150

202151
The `Face SDK` provides a single API for detecting faces, determining `face orientation` (yaw, roll, pitch), assessing `face quality`, detecting `facial occlusion`, `eye closure`, `mouth opening`, and identifying `facial landmarks`.
203152

0 commit comments

Comments
 (0)