MareArts ANPR (Automatic Number Plate Recognition) library
Project description
MareArts ANPR SDK
๐ช๐บ ANPR EU (European Union)
Auto Number Plate Recognition for EU countries
๐ฆ Available Countries: (We are adding more countries.)
๐ฆ๐ฑ Albania ๐จ๐ฟ Czechia ๐ฆ๐ฉ Andorra ๐ฉ๐ฐ Denmark ๐ฆ๐น Austria ๐ซ๐ฎ Finland
๐ง๐ช Belgium ๐ซ๐ท France ๐ง๐ฆ Bosnia and Herzegovina
๐ฉ๐ช Germany ๐ง๐ฌ Bulgaria ๐ฌ๐ท Greece ๐ญ๐ท Croatia ๐ญ๐บ Hungary ๐จ๐พ Cyprus ๐ฎ๐ช Ireland
๐ฆ Recognisable Characters:
char_list = [
"-", ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "d", "i",
"m", "o", "ร", "ร", "ฤ", "ฤ", "ฤ", "ล ", "ลฝ", "ะ"
]
๐ฐ๐ท ANPR Korea
ํ๊ตญ ์๋์ฐจ ๋ฒํธํ ์ธ์ ์๋ฃจ์
์ธ์ ๊ฐ๋ฅ ๋ฌธ์:
char_list = [
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'๊ฐ', '๊ฐ', '๊ฑฐ', '๊ฒฝ', '๊ณ ', '๊ด', '๊ตฌ', '๊ธฐ',
'๋', '๋จ', '๋', '๋
ธ', '๋',
'๋ค', '๋', '๋', '๋', '๋', '๋',
'๋ผ', '๋ฌ', '๋ก', '๋ฃจ',
'๋ง', '๋จธ', '๋ชจ', '๋ฌด', '๋ฌธ',
'๋ฐ', '๋ฐฐ', '๋ฒ', '๋ณด', '๋ถ', '๋ถ',
'์ฌ', '์ฐ', '์', '์ธ', '์', '์',
'์', '์ด', '์ค', '์ฐ', '์ธ', '์', '์ก', '์ธ',
'์', '์ ', '์ ', '์ ', '์กฐ', '์ข
', '์ฃผ',
'์ฒ', '์ถฉ',
'ํ', 'ํ', 'ํธ'
]
Installation
To install the MareArts ANPR package, use the following pip command:
pip install marearts-anpr
๐ชช License Key
For private keys, please visit MareArts ANPR Solution. For inquiries about private keys, contact us at hello@marearts.com.
๐ค Live Test
๐บ ANPR Result Videos
Check here to see the license plate recognition results in YouTube videos.
๐ Using SDK
๐ฌ SDK Usage
Here's an example of how to use the updated SDK:
# pip install marearts-anpr
import cv2
from PIL import Image
from marearts_anpr import ma_anpr_detector
from marearts_anpr import ma_anpr_ocr
from marearts_anpr import marearts_anpr_from_pil
from marearts_anpr import marearts_anpr_from_image_file
from marearts_anpr import marearts_anpr_from_cv2
if __name__ == '__main__':
#################################
## Initiate MareArts ANPR
print("EU ANPR")
user_name = "your_email"
serial_key = "your_serial_key"
detector_model_version = "middle" # Options: middle, v10_small, v10_middle, v10_large
ocr_model_version = "eu" # Options: eu, kr
# MareArts ANPR Detector Inference
anpr_d = ma_anpr_detector(detector_model_version, user_name, serial_key, conf_thres=0.3, iou_thres=0.5)
# MareArts ANPR OCR Inference
anpr_r = ma_anpr_ocr(ocr_model_version, user_name, serial_key)
#################################
#################################
# Routine Task 1 - Predict from File
image_path = './sample_images/eu_test1.jpg'
output = marearts_anpr_from_image_file(anpr_d, anpr_r, image_path)
print(output)
# Routine Task 2 - Predict from cv2
img = cv2.imread(image_path)
output = marearts_anpr_from_cv2(anpr_d, anpr_r, img)
print(output)
# Routine Task 3 - Predict from Pillow
pil_img = Image.open(image_path)
output = marearts_anpr_from_pil(anpr_d, anpr_r, pil_img)
print(output)
#################################
#################################
## Initiate MareArts ANPR for Korea
print("ANPR Korean")
# user_name, serial_key are already defined
# anpr_d is also already initiated before
ocr_model_version = "kr"
# MareArts ANPR OCR Inference
anpr_r = ma_anpr_ocr(ocr_model_version, user_name, serial_key)
#################################
# Routine Task 1 - Predict from File
image_path = './sample_images/kr_test2.jpg'
output = marearts_anpr_from_image_file(anpr_d, anpr_r, image_path)
print(output)
# Routine Task 2 - Predict from cv2
img = cv2.imread(image_path)
output = marearts_anpr_from_cv2(anpr_d, anpr_r, img)
print(output)
# Routine Task 3 - Predict from Pillow
pil_img = Image.open(image_path)
output = marearts_anpr_from_pil(anpr_d, anpr_r, pil_img)
print(output)
#################################
๐ฌ Returns
The output from the ANPR will be similar to:
{
'results': [
{'ocr': 'SL593LM', 'ocr_conf': 99, 'ltrb': [819, 628, 1085, 694], 'ltrb_conf': 90}
],
'ltrb_proc_sec': 0.22,
'ocr_proc_sec': 0.15
}
{
'results': [
{'ocr': '123๊ฐ4568', 'ocr_conf': 99, 'ltrb': [181, 48, 789, 186], 'ltrb_conf': 83},
{'ocr': '123๊ฐ4568', 'ocr_conf': 99, 'ltrb': [154, 413, 774, 557], 'ltrb_conf': 82},
{'ocr': '123๊ฐ4568', 'ocr_conf': 99, 'ltrb': [154, 601, 763, 746], 'ltrb_conf': 80},
{'ocr': '123๊ฐ4568', 'ocr_conf': 99, 'ltrb': [156, 217, 773, 369], 'ltrb_conf': 80}
],
'ltrb_proc_sec': 0.23,
'ocr_proc_sec': 0.6
}
- Results: Contains OCR text, probabilities, and detection coordinate(left, top, right, bottom).
- Processing Speeds: Provided for license plate detection and OCR.
API for testing
This is for testing purposes
API key limits: 1000 requests per day.
User ID: marearts@public
X-API-Key: J4K9L2Wory34@G7T1Y8rt-PP83uSSvkV3Z6ioSTR!
API Call for EU
To make an API call for EU ANPR, use the following command:
#!bin/bash
curl -X POST https://we303v9ck8.execute-api.eu-west-1.amazonaws.com/Prod/marearts_anpr_eu \
-H "Content-Type: image/jpeg" \
-H "x-api-key: your-api-key" \
-H "user-id: your-user-id" \
--data-binary "@./path/upload.jpg"
API Call for Korea
To make an API call for Korean ANPR, use the following command:
#!bin/bash
curl -X POST https://we303v9ck8.execute-api.eu-west-1.amazonaws.com/Prod/marearts_anpr \
-H "Content-Type: image/jpeg" \
-H "x-api-key: your-api-key" \
-H "user-id: your-user-id" \
--data-binary "@./path/upload.jpg"
More Detail
email : hello@marearts.com
home page : https://marearts.com
blog : http://study.marearts.com
paypal : https://study.marearts.com/p/anpr-lpr-solution.html
live test : http://live.marearts.com
๐๐ปโโ๏ธ Thank you!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file marearts_anpr-0.0.1019.3-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 191.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 582e845334937fbcf16b894951751bf9ab3d76b6ea000ac74dbe74471c9a5872 |
|
MD5 | 2141c03ddba89c919d3ac43038ff6797 |
|
BLAKE2b-256 | 8e15f226491f260db2abee44199f37c76ff3f5b518e04d76b788dfa517a3d382 |
File details
Details for the file marearts_anpr-0.0.1019.3-cp311-cp311-manylinux2014_x86_64.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp311-cp311-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 948d17185c345f5f4d117aa4b7a4cd23c5ad82653969f1b8acdad7cb03a1f659 |
|
MD5 | 5bc154b6283f92d465818a660931df5e |
|
BLAKE2b-256 | 31870ab5c18baaa6def5e665433d9a663c62aae53eda578ae1fa0d818a9ee3f3 |
File details
Details for the file marearts_anpr-0.0.1019.3-cp311-cp311-macosx_10_9_universal2.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 401.4 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e34a2e70bd99840d0f2336753b3186246fa93c067c89caf4b79eff37c64557b |
|
MD5 | de8e9881966414ddb716cb7cb9ec3a19 |
|
BLAKE2b-256 | f046b8e7b304eaf1a9b66c6a42515e9a81c4ee2be575c5a5ebd881d8c52d1f95 |
File details
Details for the file marearts_anpr-0.0.1019.3-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 190.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37e61217fc439e11c62ccc57d5217532a8da74216af8230a15627e2f226b602a |
|
MD5 | 991869c9c4b4541f445cd7ae868dcd10 |
|
BLAKE2b-256 | caf98ee7284808b67a72431b774c1a7c4620bde229e52382075fc1ffd2a6d8bd |
File details
Details for the file marearts_anpr-0.0.1019.3-cp310-cp310-manylinux2014_x86_64.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp310-cp310-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7d6d9c59a2a922e81baa82f21d305f7a5c20fea298f98c96d24c20a51fad63b |
|
MD5 | 70d2f368ae0117e355bb6957fdd26a2c |
|
BLAKE2b-256 | ddf19cc734a990aeb2ee77aa91bfb220ad8af409a6fd905456997a73bc8780f7 |
File details
Details for the file marearts_anpr-0.0.1019.3-cp310-cp310-macosx_10_9_universal2.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp310-cp310-macosx_10_9_universal2.whl
- Upload date:
- Size: 401.3 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54bc95c448833f41774cf272db1923d6b4ac12f32197f337ac121e31d093a571 |
|
MD5 | df09562990234b527d5068a1db846d42 |
|
BLAKE2b-256 | f563dca0537233ddab430022b4898f3c805f5feb46814dc9cbd475ce1e258737 |
File details
Details for the file marearts_anpr-0.0.1019.3-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 214.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3963899100f088019036b7b09063fcfca6580a5053b338ca9414d59cc1eb1511 |
|
MD5 | 9901a1be05bc06bcf1a0603489fb0b5c |
|
BLAKE2b-256 | 558a2274b0d5db22b96e456d491f14a496e2fcda96629a65edfc8a2189ad0877 |
File details
Details for the file marearts_anpr-0.0.1019.3-cp39-cp39-manylinux2014_x86_64.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp39-cp39-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a110c719d2cbdb3af520b23307d582eb560b2c0330f5465b1643a1dc071fe993 |
|
MD5 | 9aa7a826ca9aa4c273d8d5c39c1f0576 |
|
BLAKE2b-256 | 4169dd560c256732a559742ee388130c82f36539bffa05d9fc79b7d1adc18ce6 |
File details
Details for the file marearts_anpr-0.0.1019.3-cp39-cp39-macosx_10_9_universal2.whl
.
File metadata
- Download URL: marearts_anpr-0.0.1019.3-cp39-cp39-macosx_10_9_universal2.whl
- Upload date:
- Size: 404.3 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffcc2e2a0d92e7048d4cd720f6ba2e27dd9ab0e6458626e86a986e6149f31aa8 |
|
MD5 | fa1c720c3c34d0845d68e075e1ed3588 |
|
BLAKE2b-256 | d3fa0f925d73eed3f403c3eabd1bd3042afa8c98ce81dd7d6365a4d0635f9d6a |