Using PIP Python Package

iApp Technology just released a PIP Python Package on Bank Book OCR.

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 Book Bank OCR API

# Book Bank OCR API required an image file path
api.book_bank_api("iapp_ai/media/E7393203-15.jpg").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)

# Book Bank OCR API required an image file path
result = api.book_bank_api("iapp_ai/media/E7393203-15.jpg").json()
print(result)

# {
#  'account_name': 'ยื่อนวุทยี กรำฺบาส ภชง',
#  'account_number': '2742027734',
#  'bank_branch': '02าa สายานอน อาจาววนทาวเวอาสไถบนาภาวง',
#  'bank_name': 'ไทยพาณิชย์ (SCB) - 014',
#  'confidence': '49.58',
#  'inference_time(s)': '0.271',
#  'message': 'Success',
#  'reason_codes': {'account_name': 'Success',
#   'account_number': 'Success',
#   'bank_branch': 'Success',
#   'bank_name': 'Success'},
#  'status': 200
#  }

Full Example in Google Colaboratory

Last updated