Metadata-Version: 2.1
Name: fastanpr
Version: 0.1.1
Summary: A fast automatic number-plate recognition (ANPR) library
Home-page: https://github.com/arvindrajan92/fastanpr
Author: arvindrajan92 (Arvind Rajan)
Author-email: <arvindrajan92@gmail.com>
License: MIT
Keywords: python,anpr,fast,licence plate,number plate,detection,recognition,YOLOv8,paddleocr,paddlepaddle
Classifier: Programming Language :: Python :: 3.9
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ultralytics>=8.1.26
Requires-Dist: paddlepaddle>=2.6.0
Requires-Dist: paddleocr>=2.7.0.3
Provides-Extra: dev
Requires-Dist: pytest>=8.1.1; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"

# FastANPR
A fast automatic number-plate recognition (ANPR) library. This package employs YOLOv8, a lightweight model, for detection, and Paddle OCR, a lightweight *optical character recognition* (OCR) library.

## Installation
```bash
pip install fastanpr
```

## Usage
```python
import cv2
import asyncio

from fastanpr import FastANPR

# To use cuda, replace 'cpu' with 'cuda' or device id, e.g., '0'. Default is set to 'cpu'.
fast_anpr = FastANPR(device='cpu')

async def show_anpr_result(file: str) -> None:
    image = cv2.cvtColor(cv2.imread(file), cv2.COLOR_BGR2RGB)
    anpr_result = await fast_anpr.run(image)
    print(anpr_result)

files = [...]
_ = await asyncio.gather(*[show_anpr_result(file) for file in files])
```

## Licence
This project incorporates the YOLOv8 model from Ultralytics, which is licensed under the AGPL-3.0 license. As such, this project is also distributed under the [GNU Affero General Public License v3.0 (AGPL-3.0)](LICENSE) to comply with the licensing requirements.

For more details on the YOLOv8 model and its license, please visit the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics).

## Contributing

We warmly welcome contributions from the community! If you're interested in contributing to this project, please start by reading our [CONTRIBUTING.md](CONTRIBUTING.md) guide.

Whether you're looking to submit a bug report, propose a new feature, or contribute code, we're excited to see what you have to offer. Please don't hesitate to reach out by opening an issue or submitting a pull request.

Thank you for considering contributing to our project. Your support helps us make the software better for everyone.
