PARSEq Text Recognition model for Arabic language

Use with the DocTr.

Example usage:

>>> from doctr.io import DocumentFile
>>> from doctr.models import ocr_predictor, from_hub

>>> img = DocumentFile.from_images(['<image_path>'])

>>> # Load your models from the hub
>>> reco_model = from_hub("madskills/parseq_arabic_v1")

>>> # Load custom detection model for best performance
>>> det_model = from_hub("madskills/fast_base_arabic_v1")

>>> # Pass it to the predictor
>>> # If your model is a recognition model:
>>> predictor = ocr_predictor(det_arch=det_model,
>>>                           reco_arch=reco_model,
>>>                           pretrained=True
>>>                          )

>>> # optional if your documents are not well oriented
>>> # custom crop and page orientation predictors
>>> page_orientation_model = from_hub("madskills/mobilenet_v3_small_page_orientation_arabic")
>>> crop_orientation_model = from_hub("madskills/mobilenet_v3_small_crop_orientation_arabic")

# set the custom orientation predictors
>>> predictor.crop_orientation_predictor = crop_orientation_predictor(
>>>     pretrained=False, arch=crop_orientation_model
>>> )
>>> predictor.page_orientation_predictor = page_orientation_predictor(
>>>     pretrained=False, arch=page_orientation_model
>>> )

>>> # Get your predictions
>>> res = predictor(img)
Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support