File size: 1,050 Bytes
2720487
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---

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

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

### Switch to v0.4.14

```bash
git checkout f7c6c04
```

### Install Dependencies

You can install the required dependencies using the following command:

```bash
pip install -r requirements.txt
```

```bash
pip install ultralytics
```

```bash
pip install supervision
```

### Suryolo Pipeline 

Download `surya_yolo_pipeline.py` file from the Repository.

```python
from surya_yolo_pipeline import suryolo
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.