Downloads · 30 days
8
11% of all-time downloads
madskills/parseq_arabic_v1
parseq_arabic_v1 is a machine learning model from madskills. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
8
11% of all-time downloads
All-time downloads
76
Public
Repo size
95.3 MB
Likes
0
Public
Click a slice to open those files.
.bin95.3 MB · 100%
From the Hugging Face model README
Use with the DocTr.
>>> 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)