🤗 Hugging Face - Here
📚 Product & Resources - Here
🛟 Help Center - Here
💼 KYC Verification Demo - Here
🙋♀️ Docker Hub - Here
sudo docker pull kbyai/palmprint-recognition:latest
sudo docker run -v ./license.txt:/root/kby-ai-palmprint/license.txt -p 8081:8080 -p 9001:9000 kbyai/palmprint-recognition:latest
This repository demonstrates an efficient and accurate palmprint recognition technology by implementing palm-print comparison based on palmprint feature extraction and face matching algorithm, which was implemented via a Dockerized Flask API
.
It includes features that allow for testing plamprint recognition between two images using both image files and base64-encoded
images.
In this repo, we integrated
KBY-AI
's palmprint recognition solution intoLinux Server SDK
by wrapping with docker image.
We can customize the SDK to align with customer's specific requirements.
No. | Repository | SDK Details | Status |
---|---|---|---|
➡️ | Palmprint Recognition - Linux | Palmprint Comparison Linux SDK | Available |
2 | Palmprint Recognition - Docker | Palmprint Comparison Docker Image | Available |
3 | Palmvein Recognition - Linux | Palmvein Comparison Linux SDK | Developing |
4 | Palmprint Recognition - Android | Palmprint Comparison Android SDK | Available |
5 | Palmprint Recognition - iOS | Palmprint Comparison iOS SDK | Developing |
To get more products, please visit products here:
This SDK
can be tested on online test demo page here:
Please select tab 'Palmprint Recognition` for this SDK
The API
can be evaluated through Postman
tool. Here are the endpoints for testing:
-
Test with an image file: Send a
POST
request tohttp://89.116.159.229:8084/compare_palmprint
. -
Test with a
base64-encoded
image: Send aPOST
request tohttp://89.116.159.229:8084/compare_palmprint_base64
.You can download the
Postman
collection to easily access and use these endpoints. click here
This project demonstrates KBY-AI
's Palmprint Recognition Server SDK
, which requires a license per machine.
-
The code below shows how to use the license:
Palmprint-Recognition-Docker/app.py
Lines 21 to 31 in 290f714
-
To request the license, please provide us with the
machine code
obtained from thegetMachineCode
function.
🧙Email:
[email protected]
🧙Telegram:
@kbyai
🧙WhatsApp:
+19092802609
🧙Skype:
live:.cid.66e2522354b1049b
🧙Facebook:
https://www.facebook.com/KBYAI
CPU
: 2 cores or more (Recommended: 2 cores)RAM
: 4 GB or more (Recommended: 8 GB)HDD
: 4 GB or more (Recommended: 8 GB)OS
:Ubuntu 20.04
or later- Dependency:
OpenVINO™ Runtime
(Version: 2022.3)
-
Clone the project:
git clone https://github.com/kby-ai/Palmprint-Recognition-Docker.git
cd Palmprint-Recognition-Docker
-
Build the
Docker
image:sudo docker build --pull --rm -f Dockerfile -t kby-ai-palmprint:latest .
-
Run the
Docker
container:sudo docker run -v ./license.txt:/root/kby-ai-palmprint/license.txt -p 8081:8080 -p 9001:9000 kby-ai-palmprint
-
Send us the
machine code
and then we will give you a license key to make theSDK
activate.After that, update the
license.txt
file by overwriting thelicense key
that you received. Then, run theDocker
container again. -
Here are the endpoints to test the
API
throughPostman
:Test with an image file: Send a
POST
request tohttp://{xx.xx.xx.xx}:8081/compare_palmprint
.Test with a
base64-encoded
image: Send aPOST
request tohttp://{xx.xx.xx.xx}:8081/compare_palmprint_base64
.You can download the
Postman
collection to easily access and use these endpoints. click here
- Setup
Gradio
Ensure that the necessary dependencies are installed.
Gradio
requiresPython 3.6
or above.
InstallGradio
usingpip
by running the following command:pip install gradio
- Run the demo with the following command:
cd gradio python demo.py
SDK
can be tested on the following URL:http://127.0.0.1:9000
- Import SDK python package
import handtool
- Create new object for using
SDK
config = handtool.EncoderConfig() encoder = handtool.create_encoder(config)
- Obtain the
machine code
to activate and request a licensemachineCode = encoder.getMachineCode() print("\nmachineCode: ", machineCode.decode('utf-8'))
- Activate the
SDK
using the license keyOnceret = encoder.setActivation(license.encode('utf-8')) print("\nactivation: ", ret)
ret
value is zero, SDK can get work started
-
Hand Detection
The
SDK
provides a single API for detecting hands, determininghand landmark
.
The function can be used as follows:hand_type, x1, y1, x2, y2, detect_state = encoder.detect_using_bytes(img) roi = mat_to_bytes(get_roi(img, hand_type, x1, y1, x2, y2))
hand_type
: it indicates hand type value,0
value:left hand
,1
value:right hand
.x1
,y1
,x2
,y2
: hand landmark points to getROI
image.roi
: handROI(Region Of Interest)
image to get palm feature.
-
Create Feature
encode_using_bytes
function returns palmprint feature againstROI
data.</br.palmprint = encoder.encode_using_bytes(roi)
roi
: handROI(Region Of Interest)
image to get palm feature.palmprint
: palmprint feature calculated from handROI
data.
-
Similiarity The
compare_to
function takes two palmprintfeature
s as a parameter and returnsscore
value to determine whether 2 input hands are from the same or different.one_palmprint_code = encoder.encode_using_bytes(roi1) another_palmprint_code = encoder.encode_using_bytes(roi2) score = one_palmprint_code.compare_to(another_palmprint_code)
The threshold is 0.15
as a default.
Palmprint-Recognition-Docker/app.py
Lines 12 to 13 in ddf1f03