Using PIP Python Package
iApp Technology just released a PIP Python Package on Face Verification.
For easing the python development using iApp AI API service, we have released the iapp_ai python pip package. It is the api client library for iApp AI API service for python.

Installation

$ pip install iapp_ai
Note: It can be either pip or pip3 depend on your environment.

Calling Face Verification API

# Face Verification API required 4 file paths: image file path, company name, and min score
img1 = "iapp_ai/media/id-card-front.jpg"
img2 = "iapp_ai/media/id-card-front.jpg"
company_name = "iApp"
min_score = "0.1"
api.face_verification(img1, img2, company_name, min_score).json()

Example Usages

import iapp_ai
# You can request API key at https://ai.iapp.co.th
apikey = 'XXXXX_Your_API_Key_XXXXX'
api = iapp_ai.api(apikey)
# Face Verification API required 4 file paths: image file path, company name, and min score
img1 = "iapp_ai/media/id-card-front.jpg"
img2 = "iapp_ai/media/id-card-front.jpg"
company_name = "iApp"
min_score = "0.1"
result = api.face_verification(img1, img2, company_name, min_score).json()
print(result)
# {
# 'message': 'successfully performed',
# 'process_time': 0.14579439163208008,
# 'result': 'matched',
# 'similarity_score': 0.9999996650205086
# }

Full Example in Google Colaboratory

Google Colaboratory
Full Example of iApp AI API in Google Colaboratory
Copy link
Outline