ketanmore's picture
Update README.md
798bc1a verified
|
raw
history blame
1.36 kB
metadata
license: apache-2.0

Suryolo : Layout Model For Arabic Documents

Suryolo is combination of Surya layout Model form SuryaOCR(based on Segformer) and YoloV10 objection detection.

Setup Instructions

Clone the Surya OCR GitHub Repository

git clone https://github.com/vikp/surya.git
cd surya

Switch to v0.4.14

git checkout f7c6c04

Install Dependencies

You can install the required dependencies using the following command:

pip install -r requirements.txt
pip install ultralytics
pip install supervision

Suryolo Pipeline

Download surya_yolo_pipeline_copy.cpython-310-x86_64-linux-gnu.so file from the Repository. Place surya_yolo_pipeline_copy.cpython-310-x86_64-linux-gnu.so and yolov10x_best.pt in same folder.

from surya_yolo_pipeline_copy import suryolo # This import will originate from surya_yolo_pipeline_copy.cpython-310-x86_64-linux-gnu.so , which is present in the repo. Also this works with Linux based OS only.
from surya.postprocessing.heatmap import draw_bboxes_on_image

image_path = "sample.jpg"
image  = Image.open(image_path)
bboxes = suryolo(image_path)
plotted_image  = draw_bboxes_on_image(bboxes,image)

Refer to benchmark.ipynb for comparison between Traditional Surya Layout Model and Suryolo Layout Model.