Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,62 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-to-text
|
| 4 |
+
tags:
|
| 5 |
+
- layout
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## anydoclayout
|
| 9 |
+
- docs layout detection
|
| 10 |
+
|
| 11 |
+

|
| 12 |
+
|
| 13 |
+
## train datasets
|
| 14 |
+
|
| 15 |
+
### 1. labels info
|
| 16 |
+
```python
|
| 17 |
+
{0: 'header',
|
| 18 |
+
1: 'title',
|
| 19 |
+
2: 'text',
|
| 20 |
+
3: 'table',
|
| 21 |
+
4: 'figure',
|
| 22 |
+
5: 'formula',
|
| 23 |
+
6: 'footer',
|
| 24 |
+
7: 'pagenum'}
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
### 2. datasets info
|
| 28 |
+
|
| 29 |
+
- train: 841862 (opendata: 667426, selfgen: 174436)
|
| 30 |
+
- eval: 5500
|
| 31 |
+
- imgsize:1280
|
| 32 |
+
|
| 33 |
+
### 3. eval results
|
| 34 |
+
```python
|
| 35 |
+
Class Images Instances Box(P R)
|
| 36 |
+
all 5500 52274 0.921 0.897
|
| 37 |
+
header 1461 2337 0.92 0.878
|
| 38 |
+
title 2308 5473 0.896 0.893
|
| 39 |
+
text 4149 34156 0.937 0.927
|
| 40 |
+
table 1476 1913 0.946 0.958
|
| 41 |
+
figure 1842 3343 0.94 0.94
|
| 42 |
+
formula 735 1506 0.881 0.876
|
| 43 |
+
footer 745 1157 0.909 0.781
|
| 44 |
+
pagenum 2164 2389 0.938 0.919
|
| 45 |
+
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
### if you want to get datasets
|
| 49 |
+
- email:[email protected]
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
### how to use
|
| 53 |
+
|
| 54 |
+
```python
|
| 55 |
+
from pathlib import Path
|
| 56 |
+
from ultralytics import YOLO
|
| 57 |
+
|
| 58 |
+
modelfile = Path(model_dir).joinpath('anydoclayout-yolo11s-imgsz1280.pt')
|
| 59 |
+
model = YOLO(modelfile)
|
| 60 |
+
res = model.predict('your img file', imgsz = 1280)
|
| 61 |
+
|
| 62 |
+
```
|