Giter Site home page Giter Site logo

kby-ai / idcardrecognition-docker Goto Github PK

View Code? Open in Web Editor NEW
57.0 9.0 44.0 13.24 MB

ID document recognition on server to read ID card, passport and driver license, which is most powerful ID scanner and ID document reader

Home Page: https://web.kby-ai.com

License: Other

Dockerfile 1.94% Python 93.07% C 4.98%
driver-license id-card-recognition passport-reader id-card-recognition-sdk id-document-reader document-ocr id-scan id-scanning ocr-text-reader authentication barcode-scanner biometrics idv idverification kyc mrz-scanner nfc-card-reader onboarding id-check

idcardrecognition-docker's Introduction

๐Ÿ“š Product & Resources - Here

๐Ÿ›Ÿ Help Center - Here

๐Ÿ’ผ KYC Verification Demo - Here

๐Ÿ™‹โ€โ™€๏ธ Docker Hub - Here

sudo docker pull kbyai/idcard-recognition:latest
sudo docker run -e LICENSE="xxxxx" -p 8082:8080 -p 9002:9000 kbyai/idcard-recognition:latest

IDCardRecognition-Docker

Introduction

The demo project demonstrates the server-based recognition capabilities for ID cards, passports, and driver's licenses.
At the core of this project lies the ID Card Recognition SDK, which has been developed to provide comprehensive support for recognizing ID cards, passports, and driver's licenses from over 180 countries.

The demo is integrated with KBY-AI's ID Card Recognition Server SDK.
For other solutions, please explore the following:
Face Liveness Detection - Android(Basic SDK)
Face Liveness Detection - iOS(Basic SDK)
Face Recognition - Android(Stdndard SDK)
Face Recognition - iOS(Standard SDK)
Face Recognition - Flutter(Standard SDK)
Face Recognition - React-Native(Standard SDK)
Face Attribute - Android(Premium SDK)
Face Attribute - iOS(Premium SDK)

Try the API

Online Demo

You can test the SDK using images from the following URL: https://web.kby-ai.com

image

Documentation

https://docs.kby-ai.com/help/product/id-card-sdk

Postman

To test the API, you can use Postman. Here are the endpoints for testing:

SDK License

This project uses KBY-AI's Face Recognition Server SDK, which requires a license per machine.

  • The code below shows how to use the license:

    licensePath = "license.txt"
    license = ""
    machineCode = getMachineCode()
    print("machineCode: ", machineCode.decode('utf-8'))
    try:
    with open(licensePath, 'r') as file:
    license = file.read()
    except IOError as exc:
    print("failed to open license.txt: ", exc.errno)
    print("license: ", license)

  • To request the license, please provide us with the machine code obtained from the "getMachineCode" function.

Please contact us:

๐Ÿง™Email: [email protected]
๐Ÿง™Telegram: @kbyai
๐Ÿง™WhatsApp: +19092802609
๐Ÿง™Skype: live:.cid.66e2522354b1049b
๐Ÿง™Facebook: https://www.facebook.com/KBYAI

How to run

1. System Requirements

  • 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

2. Setup and Test

  • Clone the project:

    git clone https://github.com/kby-ai/IDCardRecognition-Docker.git
    
  • Download the model from Google Drive: click here

    cd IDCardRecognition-Docker
    
    wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1fmTUG7a9IoMA8QiXR9A0xf3Cr6D5UkdC' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1fmTUG7a9IoMA8QiXR9A0xf3Cr6D5UkdC" -O data.zip && rm -rf /tmp/cookies.txt
    
    unzip data.zip
    
  • Build the Docker image:

    sudo docker build --pull --rm -f Dockerfile -t kby-ai-idcard:latest .
    
  • Run the Docker container:

    sudo docker run -v ./license.txt:/root/kby-ai-idcard/license.txt -p 8082:8080 kby-ai-idcard
    
  • Send us the machine code and then we will give you a license key.

    After that, update the license.txt file by overwriting the license key that you received. Then, run the Docker container again.

    image

    image

  • To test the API, you can use Postman. Here are the endpoints for testing:

    Test with an image file: Send a POST request to http://{xx.xx.xx.xx}:8082/idcard_recognition

    Test with a base64-encoded image: Send a POST request to http://{xx.xx.xx.xx}:8082/idcard_recognition_base64

    You can download the Postman collection to easily access and use these endpoints. click here

3. Execute the Gradio demo

  • Setup Gradio Ensure that you have the necessary dependencies installed.

    Gradio requires Python 3.6 or above.

    You can install Gradio using pip by running the following command:

    pip install gradio
    
  • Run the demo Run it using the following command:

    cd gradio
    python demo.py
    
  • You can test within the following URL:
    http://127.0.0.1:9000

About SDK

1. Initializing the SDK

  • Step One

    First, obtain the machine code for activation and request a license based on the machine code.

    machineCode = getMachineCode()
    print("machineCode: ", machineCode.decode('utf-8'))
    
  • Step Two

    Next, activate the SDK using the received license.

    setActivation(license.encode('utf-8'))
    

    If activation is successful, the return value will be SDK_SUCCESS. Otherwise, an error value will be returned.

  • Step Three

    After activation, call the initialization function of the SDK.

    initSDK()
    

    If initialization is successful, the return value will be SDK_SUCCESS. Otherwise, an error value will be returned.

2. APIs

  • ID Card Recognition

    The SDK provides a single API for ID card recognition.

    The function can be used as follows:

    ret = idcardRecognition(base64_image.encode('utf-8'))
    

    The function accepts only one parameter, which should be the base64-encoded format of the image (e.g., JPG, PNG, etc.).

    If the recognition is successful, the function will return a JSON-formatted string containing the recognized information. In case of failure, the return value will be NULL.

idcardrecognition-docker's People

Contributors

justin200914 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.