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

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

Calling Book Bank OCR API

1
# Book Bank OCR API required an image file path
2
api.book_bank_api("iapp_ai/media/E7393203-15.jpg").json()
Copied!

Example Usages

1
import iapp_ai
2
3
4
# You can request API key at https://ai.iapp.co.th
5
apikey = 'XXXXX_Your_API_Key_XXXXX'
6
7
api = iapp_ai.api(apikey)
8
9
# Book Bank OCR API required an image file path
10
result = api.book_bank_api("iapp_ai/media/E7393203-15.jpg").json()
11
print(result)
12
13
# {
14
# 'account_name': 'ยื่อนวุทยี กรำฺบาส ภชง',
15
# 'account_number': '2742027734',
16
# 'bank_branch': '02าa สายานอน อาจาววนทาวเวอาสไถบนาภาวง',
17
# 'bank_name': 'ไทยพาณิชย์ (SCB) - 014',
18
# 'confidence': '49.58',
19
# 'inference_time(s)': '0.271',
20
# 'message': 'Success',
21
# 'reason_codes': {'account_name': 'Success',
22
# 'account_number': 'Success',
23
# 'bank_branch': 'Success',
24
# 'bank_name': 'Success'},
25
# 'status': 200
26
# }
Copied!

Full Example in Google Colaboratory

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