File size: 1,023 Bytes
9d27a54 3ec897e 9d27a54 21e13a0 9d27a54 96a7ac9 9d27a54 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
---
language:
- fa
library_name: hezar
tags:
- image-to-text
- hezar
datasets:
- hezarai/persian-license-plate-v1
pipeline_tag: image-to-text
new_version: hezarai/crnn-fa-license-plate-recognition-v2
---
A robust CRNN-based OCR model for license plate recognition (Persian only). This model is a finetuned version of [crnn-base-fa-64x256](https://huggingface.co./hezarai/crnn-base-fa-64x256)
on the [Persian license plate dataset (v1)](https://huggingface.co./datasets/hezarai/persian-license-plate-v1).
Note that this model only works on a cropped image of a plate, so you have to run an object(license plate) detection model and pass its output to this model to work.
## Usage
```
pip install hezar
```
```python
from hezar.models import Model
model = Model.load("hezarai/crnn-fa-64x256-license-plate-recognition")
plate_text = model.predict("assets/license_plate_ocr_example.jpg")
print(plate_text) # Persian text of mixed numbers and characters might not show correctly in the console
```
```
['۵۷س۷۷۹۷۷']
``` |