Metadata-Version: 2.1
Name: marearts-anpr
Version: 3.10.0b11
Summary: MareArts ANPR (Automatic Number Plate Recognition) library with multi-region support
Home-page: https://www.marearts.com
Author: MareArts
Author-email: MareArts <hello@marearts.com>
License: Proprietary
Project-URL: Homepage, https://github.com/marearts/marearts-anpr
Keywords: anpr,license plate recognition,computer vision,ocr,vehicle detection
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Requires-Python: <3.15,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: marearts-crystal>=2.5.0
Requires-Dist: PyYAML>=6.0
Requires-Dist: pillow>=10.0
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.23.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: httpx<1.0,>=0.24.0
Requires-Dist: requests>=2.28.0
Requires-Dist: onnxruntime>=1.15.0; python_version < "3.13"
Requires-Dist: numpy<2.0,>=1.23.0; python_version == "3.10"
Requires-Dist: numpy<3.0,>=2.0.0; python_version >= "3.11"
Requires-Dist: onnxruntime>=1.24.2; python_version >= "3.13" and sys_platform != "darwin"
Requires-Dist: onnxruntime>=1.24.2; python_version >= "3.13" and sys_platform == "darwin" and platform_machine == "arm64"
Requires-Dist: onnxruntime>=1.20.0; python_version >= "3.13" and sys_platform == "darwin" and platform_machine == "x86_64"
Provides-Extra: all-gpu
Requires-Dist: tensorrt>=8.6.0; (platform_system == "Linux" and platform_machine == "x86_64") and extra == "all-gpu"
Requires-Dist: pycuda>=2022.1; (platform_system == "Linux" and platform_machine == "x86_64") and extra == "all-gpu"
Requires-Dist: nvidia-cuda-runtime-cu12; (platform_system == "Linux" and platform_machine == "x86_64") and extra == "all-gpu"
Requires-Dist: onnxruntime-gpu>=1.15.0; (python_version < "3.13" and ((platform_system == "Linux" and platform_machine == "x86_64") or (platform_system == "Windows" and platform_machine == "AMD64"))) and extra == "all-gpu"
Requires-Dist: onnxruntime-directml>=1.15.0; (python_version < "3.13" and platform_system == "Windows" and platform_machine == "AMD64") and extra == "all-gpu"
Requires-Dist: onnxruntime-gpu>=1.24.2; (python_version >= "3.13" and ((platform_system == "Linux" and platform_machine == "x86_64") or (platform_system == "Windows" and platform_machine == "AMD64"))) and extra == "all-gpu"
Requires-Dist: onnxruntime-directml>=1.24.2; (python_version >= "3.13" and platform_system == "Windows" and platform_machine == "AMD64") and extra == "all-gpu"
Provides-Extra: cuda
Requires-Dist: onnxruntime-gpu>=1.15.0; (python_version < "3.13" and ((platform_system == "Linux" and platform_machine == "x86_64") or (platform_system == "Windows" and platform_machine == "AMD64"))) and extra == "cuda"
Requires-Dist: onnxruntime-gpu>=1.24.2; (python_version >= "3.13" and ((platform_system == "Linux" and platform_machine == "x86_64") or (platform_system == "Windows" and platform_machine == "AMD64"))) and extra == "cuda"
Provides-Extra: directml
Requires-Dist: onnxruntime-directml>=1.15.0; (python_version < "3.13" and platform_system == "Windows" and platform_machine == "AMD64") and extra == "directml"
Requires-Dist: onnxruntime-directml>=1.24.2; (python_version >= "3.13" and platform_system == "Windows" and platform_machine == "AMD64") and extra == "directml"
Provides-Extra: full
Requires-Dist: marearts-anpr[mcp]; extra == "full"
Provides-Extra: gpu
Requires-Dist: onnxruntime-gpu>=1.15.0; (python_version < "3.13" and ((platform_system == "Linux" and platform_machine == "x86_64") or (platform_system == "Windows" and platform_machine == "AMD64"))) and extra == "gpu"
Requires-Dist: onnxruntime-gpu>=1.24.2; (python_version >= "3.13" and ((platform_system == "Linux" and platform_machine == "x86_64") or (platform_system == "Windows" and platform_machine == "AMD64"))) and extra == "gpu"
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.0; extra == "mcp"
Provides-Extra: server
Requires-Dist: fastapi>=0.100.0; extra == "server"
Requires-Dist: uvicorn>=0.23.0; extra == "server"
Requires-Dist: python-multipart>=0.0.6; extra == "server"
Requires-Dist: httpx<1.0,>=0.24.0; extra == "server"
Provides-Extra: tensorrt
Requires-Dist: tensorrt>=8.6.0; (platform_system == "Linux" and platform_machine == "x86_64") and extra == "tensorrt"
Requires-Dist: pycuda>=2022.1; (platform_system == "Linux" and platform_machine == "x86_64") and extra == "tensorrt"
Requires-Dist: nvidia-cuda-runtime-cu12; (platform_system == "Linux" and platform_machine == "x86_64") and extra == "tensorrt"

# MareArts ANPR

[![PyPI version](https://badge.fury.io/py/marearts-anpr.svg)](https://pypi.org/project/marearts-anpr/)
[![Python versions](https://img.shields.io/pypi/pyversions/marearts-anpr.svg)](https://pypi.org/project/marearts-anpr/)
[![License: Proprietary](https://img.shields.io/badge/License-Proprietary-red.svg)](https://www.marearts.com/products/anpr)
[![Live Demo](https://img.shields.io/badge/demo-live-brightgreen.svg)](http://live.marearts.com)

Automatic Number Plate Recognition — plate **detection + OCR for 80+ countries**,
with GPU acceleration, ARM/Windows support, and **Vehicle Intelligence**
(make, model, color, type, side, plate nation, and server-side OCR — cloud or on-device).

**One license covers everything:** Python SDK · REST API Server · Mobile App · Road Object Detection

> Get your license at [marearts.com/products/anpr](https://www.marearts.com/products/anpr)
> · Try the [live demo](http://live.marearts.com)
> · Full docs & examples on [GitHub](https://github.com/marearts/marearts-anpr)

---

## Install

```bash
pip install marearts-anpr
```

Linux / Windows / macOS · Python 3.10–3.14 · CPU by default (CUDA & DirectML optional).

---

## Python SDK

Detect and read license plates in a few lines of Python.

```python
from marearts_anpr import (
    ma_anpr_detector_v16, ma_anpr_ocr_v16, marearts_anpr_from_image_file
)

detector = ma_anpr_detector_v16("640p_fp32", user_name, serial_key, signature)
ocr = ma_anpr_ocr_v16("fp32", "univ", user_name, serial_key, signature)

result = marearts_anpr_from_image_file(detector, ocr, "car.jpg")
print(result)
# {'results': [{'ocr': 'ABC1234', 'ocr_conf': 99, 'ltrb': [...], ...}], ...}
```

---

## REST API Server

Production-ready server with a web dashboard — zero code deployment.

```bash
ma-anpr config              # one-time credential setup
ma-anpr server start        # http://localhost:8000

curl -X POST http://localhost:8000/api/anpr -F "image=@car.jpg"
```

20+ endpoints: detect, batch, history, watchlist, alerts, stats, config, model selection, and more.

### Docker

```bash
docker run -d --gpus all -p 8000:8000 \
  -e MAREARTS_ANPR_USERNAME="your@email.com" \
  -e MAREARTS_ANPR_SERIAL_KEY="your_serial_key" \
  -e MAREARTS_ANPR_SIGNATURE="your_signature" \
  marearts-anpr-server:latest
```

Includes CUDA acceleration, automatic CPU fallback, web dashboard, and all endpoints.

---

## Vehicle Intelligence (make / model / color / …)

Go beyond plate text — identify the vehicle itself: **make, model, color, type,
vehicle side, plate nation, and server-side OCR**.

```python
from marearts_anpr import ma_anpr_mmc

mmc = ma_anpr_mmc(user_name, serial_key, signature)
info = mmc.enrich(image, anpr_results)   # run ANPR first, then enrich
print(info)
```

Two backends, identical output fields:

- **Cloud** — no local model, results in a single API call.
- **On-device (offline)** — a compact vision-language model (Qwen3-VL-2B) on your GPU/CPU,
  with no internet and no quota.

```bash
ma-anpr mmc-setup           # download on-device model + engine (~1.5 GB)
ma-anpr mmc-backend local   # switch enrichment to on-device (or: cloud)
ma-anpr mmc-uninstall --all # cleanly remove the engine + model
```

Also available on the server via `POST /api/anpr/mmc`, with backend switching through
`GET /api/mmc/status` and `PUT /api/mmc/backend`.

---

## Road Object Detection

Detect **persons, vehicles, and 2-wheelers** in real time — included in your ANPR license.

```python
from marearts_road_objects import ma_road_object_detector

rod = ma_road_object_detector("640p_fp32", user_name, serial_key, signature)
result = rod.detect("street.jpg")
```

See [MareArts Road Objects](https://github.com/MareArts/MareArts-Road-Objects).

---

## Supported Regions

**80+ countries** across 12 regional groups, each with per-country character sets
for maximum accuracy.

| Code   | Region                                            |
| ------ | ------------------------------------------------- |
| `eu`   | Europe+ (37 countries: EU + Balkans + Indonesia)  |
| `ru`   | Ex-USSR (15 countries)                            |
| `asia` | Asia (17 countries)                               |
| `na`   | North America (USA, Canada, Mexico)               |
| `sa`   | South America (Brazil, Argentina)                 |
| `af`   | Africa (South Africa, Nigeria)                    |
| `oc`   | Oceania (Australia, New Zealand)                  |
| `uk`   | United Kingdom                                    |
| `cn`   | China (all provinces)                             |
| `kr`   | Korea (all plate types)                           |
| `jp`   | Japan (all prefectures)                           |
| `univ` | Universal — all of the above                      |

Pass a 2-letter country code (e.g. `de`, `au`, `th`) for best accuracy, or a group
code. Unknown codes fall back to `univ`.

---

## Mobile App

On-device ANPR for iOS and Android — parking, security, fleet management.
On-device AI (~100–160 ms), offline capable, team collaboration, webhooks,
cloud sync, and Vehicle Intelligence.

- [Download on the App Store](https://apps.apple.com/us/app/marearts-anpr/id6753904859)
- [Get it on Google Play](https://play.google.com/store/apps/details?id=com.marearts.anpr)

> No additional license required — the app works as your ANPR license.

---

## Support

| | |
| --------- | ------------------------------------------------------------------------------------------ |
| Homepage  | [marearts.com](https://www.marearts.com)                                                   |
| License   | [marearts.com/products/anpr](https://www.marearts.com/products/anpr)                       |
| Live Demo | [live.marearts.com](http://live.marearts.com)                                              |
| Docs      | [github.com/marearts/marearts-anpr](https://github.com/marearts/marearts-anpr)             |
| Contact   | [hello@marearts.com](mailto:hello@marearts.com)                                            |
| YouTube   | [Video Examples](https://www.youtube.com/playlist?list=PLvX6vpRszMkxJBJf4EjQ5VCnmkjfE59-J) |

---

© 2026 MareArts. All rights reserved.
