Using PIP Python Package
iApp Technology just released a PIP Python Package on Thai Vehicle License Plate 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 Thai Vehicle License Plate API

1
# License Plate OCR api required an image file path
2
api.license_plate_lpr("iapp_ai/media/plate.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
# License Plate OCR api required an image file path.
10
result = api.license_plate_lpr("iapp_ai/media/plate.jpg").json()
11
print(result)
12
13
# {
14
# 'conf': 93.12893677,
15
# 'infer_time(s)': 1.7994873523712158,
16
# 'lp_number': '2กธ7120',
17
# 'message': 'success',
18
# 'province': 'th-10:Bangkok (กรุงเทพมหานคร)',
19
# 'status': 200,
20
# 'vehicle_brand': 'nissan',
21
# 'vehicle_color': 'black',
22
# 'vehicle_model': 'nissan_sunny'
23
# }
Copied!

Full Example in Google Colaboratory

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