Vehicle Registration Book OCR

Extract vehicle registration book information from image

Error Definition

http statuserror_codeerror_message

200

-

-

400

1001

Too low image resolution (image must be base64 and image size must between 500x500 and 10000x10000)

400

1002

Image quality not acceptable (image must be base64 and image size must between 500x500 and 10000x10000)

400

1003

cannot convert image please check your image (image must be base64 and image size must between 500x500 and 10000x10000)

500

2001

some error occur in serverside

List of key

key engkey thai

ownership_adress

ที่อยู่ผู้ถือกรรมสิทธิ์

ownership

ผู้ถือกรรมสิทธิ์

model

แบบ

province

จังหวัด

registration_number_car

เลขทะเบียน

registration_date

วันที่จดทะเบียน

type

ประเภท

characteristic

ลักษณะ

brand_car

ยี่ห้อรถ

car_number_position

ที่อยู่_ของเลขตัวรถ

car_number

เลขตัวรถ

engine_number

เลขเครื่องยนต์

brand_engine

ยี่ห้อเครื่องยนต์

type_fuel

เชื้อเพลิง

engine_number_position

ที่อยู่_ของเลขเครื่องยนต์

characteristic_drive

ลักษณะการขับเคลื่อน

horsepower

จำนวนแรงม้า

engine_size

ขนาดเครื่องยนต์

weight_car

น้ำหนักรถ

weight_all

น้ำหนักรวม

date_of_posession

วันที่ครอบครอง

ownership_birthday_date

วัดเกิดผู้ถือกรรมสิทธิ์

ownership_number_of_card

เลขที่บัตรผู้ถือกรรมสิทธิ์

year_model

รุ่นปีคศ

color

สี

number_of_seat

จำนวนที่นั่ง

ownership_nationality

สัญชาติผู้ถือกรรมสิทธิ์

number_of_cylinders

จำนวนสูบ

owner_order

ลำดับที่

owner_adress

ที่อยู่ผู้ถือครอง

owner

ผู้ครอบครอง

owner_birthday_date

วันเกิดผู้ครอบครอง

owner_number_of_card

เลขที่บัตรครอบครอง

owner_nationality

สัญชาติผู้ครอบครอง

hire_purchase_contract_date

ลงวันที่

hire_purchase_contract_number

สัญญาเช่าซื้อเลขที่

weight_loading

น้ำหนักบรรทุก

gas_tank_positio

เลขถังแก๊ส

Extract vehicle registration book information

POST https://apis.aigen.online/aiscript/vehicle-registration-book/v1

Request Body

NameTypeDescription

image*

String

Input base64 image encoded utf-8

{
  "response_id": "996b3cf298d546adb97c719711504e58",
  "status": "1",
  "message": "success",
  "data": [
    {
      "key": "registration_date",
      "key_thai": "วันที่จดทะเบียน",
      "text": "1 สิงหาคม 2556",
      "rect": [
        246,
        217,
        224,
        37
      ],
      "rect_norm": [
        0.1487303506650544,
        0.09790508764429243,
        0.012696493349455865,
        0.00983326207781103
      ],
      "bbox": [
        [
          246,
          217
        ],
        [
          470,
          217
        ],
        [
          470,
          254
        ],
        [
          246,
          254
        ]
      ],
      "confidence": 0.9975637957264787
    },
    {
      "key": "registration_number_car",
      "key_thai": "เลขทะเบียน",
      "text": "2กด 6465",
      "rect": [
        699,
        226,
        140,
        25
      ],
      "rect_norm": [
        0.4226118500604595,
        0.09662248824283882,
        0.08464328899637243,
        0.010688328345446772
      ],
      "bbox": [
        [
          699,
          226
        ],
        [
          839,
          226
        ],
        [
          839,
          251
        ],
        [
          699,
          251
        ]
      ],
      "confidence": 0.9989588750974612
    },
    {
      "key": "province",
      "key_thai": "จังหวัด",
      "text": "กรงเทพมหานคร",
      "rect": [
        1085,
        224,
        208,
        28
      ],
      "rect_norm": [
        0.6559854897218863,
        0.09576742197520308,
        0.12575574365175332,
        0.011970927746900385
      ],
      "bbox": [
        [
          1085,
          224
        ],
        [
          1293,
          224
        ],
        [
          1293,
          252
        ],
        [
          1085,
          252
        ]
      ],
      "confidence": 0.9995594620704651
    },
    {
      "key": "type",
      "key_thai": "ประเภท",
      "text": "รถยนต์นั่งส่วนบุคคลไม่เกิน 7 คน",
      "rect": [
        163,
        254,
        410,
        53
      ],
      "rect_norm": [
        0.09854897218863362,
        0.1085934159897392,
        0.2007255139056832,
        0.022659256092347157
      ],
      "bbox": [
        [
          163,
          254
        ],
        [
          573,
          254
        ],
        [
          573,
          307
        ],
        [
          163,
          307
        ]
      ],
      "confidence": 0.9995362219403185
    },
    {
      "key": "characteristic",
      "key_thai": "ลักษณะ",
      "text": "นั่งสามตอน",
      "rect": [
        944,
        257,
        150,
        42
      ],
      "rect_norm": [
        0.5707376058041113,
        0.10987601539119282,
        0.09068923821039904,
        0.01795639162035058
      ],
      "bbox": [
        [
          944,
          257
        ],
        [
          1094,
          257
        ],
        [
          1094,
          299
        ],
        [
          944,
          299
        ]
      ],
      "confidence": 0.9986265989998415
    },
    {
      "key": "brand_car",
      "key_thai": "ยี่ห้อรถ",
      "text": "TOYOTA",
      "rect": [
        165,
        325,
        104,
        28
      ],
      "rect_norm": [
        0.09975816203143893,
        0.13894826849080805,
        0.06287787182587666,
        0.011970927746900385
      ],
      "bbox": [
        [
          165,
          325
        ],
        [
          269,
          325
        ],
        [
          269,
          353
        ],
        [
          165,
          353
        ]
      ],
      "confidence": 0.9972816021381838
    },
    {
      "key": "model",
      "key_thai": "แบบ",
      "text": "KUN61R-NKASYT A8",
      "rect": [
        648,
        322,
        294,
        28
      ],
      "rect_norm": [
        0.39177750906892383,
        0.13766566908935443,
        0.13784764207980654,
        0.011970927746900385
      ],
      "bbox": [
        [
          648,
          322
        ],
        [
          942,
          322
        ],
        [
          942,
          350
        ],
        [
          648,
          350
        ]
      ],
      "confidence": 0.9991802541735315
    },
    {
      "key": "year_model",
      "key_thai": "รุ่นปีคศ",
      "text": "2013",
      "rect": [
        1238,
        320,
        72,
        25
      ],
      "rect_norm": [
        0.7484885126964933,
        0.1368106028217187,
        0.04353083434099154,
        0.010688328345446772
      ],
      "bbox": [
        [
          1238,
          320
        ],
        [
          1310,
          320
        ],
        [
          1310,
          345
        ],
        [
          1238,
          345
        ]
      ],
      "confidence": 0.9967219829559326
    },
    {
      "key": "color",
      "key_thai": "สี",
      "text": "เกา",
      "rect": [
        102,
        378,
        51,
        28
      ],
      "rect_norm": [
        0.06166868198307134,
        0.1616075245831552,
        0.03083434099153567,
        0.011970927746900385
      ],
      "bbox": [
        [
          102,
          378
        ],
        [
          153,
          378
        ],
        [
          153,
          406
        ],
        [
          102,
          406
        ]
      ],
      "confidence": 0.8881569579705229
    },
    {
      "key": "car_number",
      "key_thai": "เลขตัวรถ",
      "text": "MR0ZZ69G503129240",
      "rect": [
        585,
        371,
        291,
        30
      ],
      "rect_norm": [
        0.35368802902055624,
        0.1586147926464301,
        0.1759371221281741,
        0.012825994014536126
      ],
      "bbox": [
        [
          585,
          371
        ],
        [
          876,
          371
        ],
        [
          876,
          401
        ],
        [
          585,
          401
        ]
      ],
      "confidence": 0.9982287594196144
    },
    {
      "key": "car_number_position",
      "key_thai": "อยู่ที่_ของเลขตัวรถ",
      "text": "หลังขวา",
      "rect": [
        1187,
        357,
        109,
        39
      ],
      "rect_norm": [
        0.7176541717049577,
        0.1526293287729799,
        0.06590084643288996,
        0.016673792218896963
      ],
      "bbox": [
        [
          1187,
          357
        ],
        [
          1296,
          357
        ],
        [
          1296,
          396
        ],
        [
          1187,
          396
        ]
      ],
      "confidence": 0.9989408617953686
    },
    {
      "key": "brand_engine",
      "key_thai": "ยี่ห้อเครื่องยนต์",
      "text": "TOYOTA",
      "rect": [
        334,
        425,
        105,
        28
      ],
      "rect_norm": [
        0.20193470374848851,
        0.18170158187259514,
        0.06348246674727932,
        0.011970927746900385
      ],
      "bbox": [
        [
          334,
          425
        ],
        [
          439,
          425
        ],
        [
          439,
          453
        ],
        [
          334,
          453
        ]
      ],
      "confidence": 0.98912547133936
    },
    {
      "key": "engine_number",
      "key_thai": "เลขเครื่องยนต์",
      "text": "1KD-U376245",
      "rect": [
        970,
        418,
        191,
        30
      ],
      "rect_norm": [
        0.5864570737605804,
        0.17870884993587002,
        0.1154776299879081,
        0.012825994014536126
      ],
      "bbox": [
        [
          970,
          418
        ],
        [
          1161,
          418
        ],
        [
          1161,
          448
        ],
        [
          970,
          448
        ]
      ],
      "confidence": 0.9983779522313938
    },
    {
      "key": "engine_number_position",
      "key_thai": "อยู่ที่_ของเลขเครื่องยนต์",
      "text": "ซ้ายเครื่อง",
      "rect": [
        130,
        460,
        140,
        42
      ],
      "rect_norm": [
        0.07859733978234583,
        0.19666524155622062,
        0.08464328899637243,
        0.01795639162035058
      ],
      "bbox": [
        [
          130,
          460
        ],
        [
          270,
          460
        ],
        [
          270,
          502
        ],
        [
          130,
          502
        ]
      ],
      "confidence": 0.9536576732189133
    },
    {
      "key": "type_fuel",
      "key_thai": "เชื้อเพลิง",
      "text": "ดีเซล",
      "rect": [
        583,
        472,
        76,
        28
      ],
      "rect_norm": [
        0.3524788391777509,
        0.20179563916203505,
        0.045949214026602174,
        0.011970927746900385
      ],
      "bbox": [
        [
          583,
          472
        ],
        [
          659,
          472
        ],
        [
          659,
          500
        ],
        [
          583,
          500
        ]
      ],
      "confidence": 0.9111476009582731
    },
    {
      "key": "number_of_cylinders",
      "key_thai": "จำนวนสูบ",
      "text": "4",
      "rect": [
        216,
        552,
        24,
        25
      ],
      "rect_norm": [
        0.13059250302297462,
        0.23599828986746474,
        0.014510278113663845,
        0.010688328345446772
      ],
      "bbox": [
        [
          216,
          552
        ],
        [
          240,
          552
        ],
        [
          240,
          577
        ],
        [
          216,
          577
        ]
      ],
      "confidence": 0.9877521602914818
    },
    {
      "key": "engine_size",
      "key_thai": "ขนาดเครื่องยนต์",
      "text": "2982",
      "rect": [
        334,
        549,
        72,
        28
      ],
      "rect_norm": [
        0.20193470374848851,
        0.23471569046601112,
        0.04353083434099154,
        0.011970927746900385
      ],
      "bbox": [
        [
          334,
          549
        ],
        [
          406,
          549
        ],
        [
          406,
          577
        ],
        [
          334,
          577
        ]
      ],
      "confidence": 0.998624324798584
    },
    {
      "key": "horsepower",
      "key_thai": "จำนวนแรงม้า",
      "text": "171",
      "rect": [
        585,
        547,
        61,
        30
      ],
      "rect_norm": [
        0.35368802902055624,
        0.23386062419837536,
        0.03688029020556227,
        0.012825994014536126
      ],
      "bbox": [
        [
          585,
          547
        ],
        [
          646,
          547
        ],
        [
          646,
          577
        ],
        [
          585,
          577
        ]
      ],
      "confidence": 0.9980420522566362
    },
    {
      "key": "characteristic_drive",
      "key_thai": "ลักษณะการขับเคลื่อน",
      "text": "2 เพลา 4 ลือ ยาง 4เพลา 4 ล้อ ยาง 4 เส้น",
      "rect": [
        937,
        533,
        359,
        37
      ],
      "rect_norm": [
        0.5665054413542926,
        0.23257802479692177,
        0.17654171704957677,
        0.010688328345446772
      ],
      "bbox": [
        [
          937,
          533
        ],
        [
          1296,
          533
        ],
        [
          1296,
          570
        ],
        [
          937,
          570
        ]
      ],
      "confidence": 0.9808997606721217
    },
    {
      "key": "weight_car",
      "key_thai": "น้ำหนักรถ",
      "text": "1850",
      "rect": [
        348,
        598,
        79,
        28
      ],
      "rect_norm": [
        0.21039903264812576,
        0.2556648140230868,
        0.047762998790810154,
        0.011970927746900385
      ],
      "bbox": [
        [
          348,
          598
        ],
        [
          427,
          598
        ],
        [
          427,
          626
        ],
        [
          348,
          626
        ]
      ],
      "confidence": 0.9994364380836487
    },
    {
      "key": "weight_all",
      "key_thai": "น้ำหนักรวม",
      "text": "1850",
      "rect": [
        348,
        650,
        79,
        25
      ],
      "rect_norm": [
        0.21039903264812576,
        0.2778965369816161,
        0.047762998790810154,
        0.010688328345446772
      ],
      "bbox": [
        [
          348,
          650
        ],
        [
          427,
          650
        ],
        [
          427,
          675
        ],
        [
          348,
          675
        ]
      ],
      "confidence": 0.9990411067807159
    },
    {
      "key": "owner_order",
      "key_thai": "ลำดับที่",
      "text": "1",
      "rect": [
        535,
        951,
        19,
        21
      ],
      "rect_norm": [
        0.3234582829504232,
        0.4065840102607952,
        0.011487303506650543,
        0.00897819581017529
      ],
      "bbox": [
        [
          535,
          951
        ],
        [
          554,
          951
        ],
        [
          554,
          972
        ],
        [
          535,
          972
        ]
      ],
      "confidence": 0.9910776705699078
    },
    {
      "key": "date_of_posession",
      "key_thai": "วันที่ครอบครองรถ",
      "text": "1 สิงหาคม 2556",
      "rect": [
        924,
        930,
        224,
        42
      ],
      "rect_norm": [
        0.558645707376058,
        0.4035912783240701,
        0.1354292623941959,
        0.010688328345446772
      ],
      "bbox": [
        [
          924,
          930
        ],
        [
          1148,
          930
        ],
        [
          1148,
          972
        ],
        [
          924,
          972
        ]
      ],
      "confidence": 0.9981964096750091
    },
    {
      "key": "ownership",
      "key_thai": "ผู้ถือกรรมสิทธิ์",
      "text": "บริษัทภัทรลิสซึ่ง จำกัด เมหาชน",
      "rect": [
        266,
        984,
        408,
        42
      ],
      "rect_norm": [
        0.1608222490931076,
        0.42069260367678496,
        0.11668681983071343,
        0.01795639162035058
      ],
      "bbox": [
        [
          266,
          984
        ],
        [
          674,
          984
        ],
        [
          674,
          1026
        ],
        [
          266,
          1026
        ]
      ],
      "confidence": 0.939600485751469
    },
    {
      "key": "ownership_number_of_card",
      "key_thai": "เลขที่บัตรผู้ถือกรรมสิทธิ์",
      "text": "0107537000211",
      "rect": [
        219,
        1047,
        221,
        30
      ],
      "rect_norm": [
        0.13240628778718258,
        0.4476271911073108,
        0.1336154776299879,
        0.012825994014536126
      ],
      "bbox": [
        [
          219,
          1047
        ],
        [
          440,
          1047
        ],
        [
          440,
          1077
        ],
        [
          219,
          1077
        ]
      ],
      "confidence": 0.9976440361322148
    },
    {
      "key": "ownership_birthday_date",
      "key_thai": "วันเกิดผู้ถือกรรมสิทธิ์",
      "text": "25 มกราคม 2537",
      "rect": [
        673,
        1045,
        241,
        30
      ],
      "rect_norm": [
        0.4068923821039903,
        0.4467721248396751,
        0.1457073760580411,
        0.012825994014536126
      ],
      "bbox": [
        [
          673,
          1045
        ],
        [
          914,
          1045
        ],
        [
          914,
          1075
        ],
        [
          673,
          1075
        ]
      ],
      "confidence": 0.9985425606369892
    },
    {
      "key": "ownership_nationality",
      "key_thai": "สัญชาติผู้ถือกรรมสิทธิ์",
      "text": "ไกย",
      "rect": [
        1109,
        1040,
        56,
        30
      ],
      "rect_norm": [
        0.6704957678355502,
        0.4446344591705857,
        0.03385731559854897,
        0.012825994014536126
      ],
      "bbox": [
        [
          1109,
          1040
        ],
        [
          1165,
          1040
        ],
        [
          1165,
          1070
        ],
        [
          1109,
          1070
        ]
      ],
      "confidence": 0.9858227642857358
    },
    {
      "key": "ownership_adress",
      "key_thai": "ที่อยู่ผู้ถือกรรมสิทธิ์",
      "text": "252/6 ถนนรัชดาภิเษก แขวงห้วยขวางเซตห้วยขวาง กรุงเทพมหานคร",
      "rect": [
        152,
        1092,
        494,
        93
      ],
      "rect_norm": [
        0.09189842805320435,
        0.466866182129115,
        0.29866989117291415,
        0.014963659683625482
      ],
      "bbox": [
        [
          152,
          1092
        ],
        [
          646,
          1092
        ],
        [
          646,
          1185
        ],
        [
          152,
          1185
        ]
      ],
      "confidence": 0.9921810111543508
    }
  ],
  "request_id": "996b3cf298d546adb97c719711504e77"
}

​Example code

import requests
import json

api = "https://apis.aigen.online/aiscript/vehicle-registration-book/v1"
headers = {"x-aigen-key": "<key>", "content-type": "application/json"}
data = json.dumps({"image": "<base64_string>"})

res = requests.post(api, data=data, headers=headers)
print(res.json())

Last updated