justin2341 commited on
Commit
7cad99e
·
verified ·
1 Parent(s): d54927d

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +80 -0
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p align="center">
2
+ <a href="https://play.google.com/store/apps/dev?id=7086930298279250852" target="_blank">
3
+ <img alt="" src="https://github-production-user-asset-6210df.s3.amazonaws.com/125717930/246971879-8ce757c3-90dc-438d-807f-3f3d29ddc064.png" width=500/>
4
+ </a>
5
+ </p>
6
+
7
+ ## Product & Resources
8
+ For more information, visit [KBY-AI's GitHub Repository](https://github.com/kby-ai/Product).
9
+
10
+ ## SDK License
11
+
12
+ This Docker image utilizes `KBY-AI`'s `SDK`, which requires a license for each machine or instance on which it runs.
13
+ - To get the machine code (`HWID`) for license, use the following syntax:
14
+ ```bash
15
+ sudo docker run -e LICENSE="xxxxx" kbyai/idl:latest
16
+ ```
17
+ - To request the license, please provide us with the machine code (`HWID`) obtained from your console.
18
+ ![image](https://github.com/user-attachments/assets/fed93cb2-a744-42fc-b0a2-964dfeeec52b)
19
+
20
+ ## Contact us:</br>
21
+ 🧙`Email:` contact@kby-ai.com</br>
22
+ 🧙`Telegram:` [@kbyaisupport](https://t.me/kbyaisupport)</br>
23
+ 🧙`WhatsApp:` [+13348402323](https://wa.me/+13348402323)</br>
24
+ 🧙`Discord:` [KBY-AI](https://discord.gg/vBUMRJJe)</br>
25
+ 🧙`Teams:` [KBY-AI](https://teams.live.com/l/invite/FBAYGB1-IlXkuQM3AY)</br>
26
+ ## Test API with Gradio Demo
27
+ To test the `Gradio` demo from the Docker image, access it at [http://127.0.0.1:7860](http://127.0.0.1:7860) or [http://localhost:7860](http://localhost:7860).
28
+
29
+ <img alt="Gradio Demo" src="https://github.com/user-attachments/assets/ccbbe118-5522-41e5-86f2-2b0b7854cfa0" width=1000/>
30
+
31
+ ## API Instruction
32
+
33
+ `API` can be tested through `Postman` based on the following `endpoint` details.</br>
34
+ ### 1. Processing Image with File
35
+ - `API` endpoint: `<base URL>/process_image`
36
+ - Method: `POST`
37
+ - Content-type: `multipart/form-data`
38
+ - Request Parameters:
39
+ | Parameter | Type | Description |
40
+ |------------------|------------------|------------------|
41
+ | image | File | ID document image file with `*.jpg` or `*.png` extension |
42
+ - Request example</br>
43
+ ![image](https://github.com/user-attachments/assets/97516d98-06ce-4f20-acd6-04ae942a3ad0)
44
+ ### 2. Processing with Base64-Encoded String
45
+ - `API` endpoint: `<base URL>/process_image_base64`
46
+ - Method: `POST`
47
+ - Content-type: `application/json`
48
+ - Request Parameters: </br>
49
+ | Parameter | Type | Description |
50
+ |------------------|------------------|------------------|
51
+ | base64 | String | The base64-encoded string of the ID document image |
52
+ - Request example</br>
53
+ ![image](https://github.com/user-attachments/assets/7a3ba967-8c44-43b0-bf9d-2af33a5a2be1)
54
+
55
+ ## API Response Description in JSON
56
+ ### 1. portraitReplace:
57
+ - Type: `Float`
58
+ - Description: A score indicating the likelihood that the portrait on the ID document has been tampered with or replaced. Higher values (closer to 1) suggest the portrait is likely original, while lower values may indicate potential tampering.</br>
59
+ ### 2. printedCopy:
60
+ - Type: `Float`
61
+ - Description: A score that assesses whether the document is a printed copy rather than an original document. Values close to zero suggest the document might be a printed copy, while higher values indicate originality.</br>
62
+ ### 3. screenReply:
63
+ - Type: `Float`
64
+ - Description: A score that determines if the document was displayed on a screen rather than being a physical ID. Lower values (closer to zero) imply a higher likelihood that the document is displayed on a screen.</br>
65
+ ### 4. Result status:
66
+ - Type: `String`
67
+ - Description: Indicates the status of the liveness check on the document. "Ok" typically means that the document passed initial verification. Other statuses could indicate different levels of authenticity or potential issues with the document.</br>
68
+ - Status: `Ok`, `Too close to camera!`, `Too close to border!`, `Document cropped!`, `Too small!`, `Multiple documents`, `Is Colorless!`, `Document not found!`, `Unknown`
69
+ - Resonpse Example:
70
+ ```json
71
+ {
72
+ "result": {
73
+ "portraitReplace": 0.590566158294678,
74
+ "printedCopy": 2.0435e-11,
75
+ "screenReply": 0.002031173091382,
76
+ "status": "Ok"
77
+ },
78
+ "resultCode": "Ok"
79
+ }
80
+ ```