---
title: anydoclayout
canonical_url: "https://www.modelscope.cn/models/anyforge/anydoclayout"
md_url: "https://www.modelscope.cn/models/anyforge/anydoclayout.md"
repository: anyforge/anydoclayout
chinese_name: anydoclayout
last_updated: 2025-09-16
license: "Apache License 2.0"
pipeline_tag: ocr-recognition
tasks:
  - ocr-recognition
  - ocr-detection
library_name:
  - pytorch
frameworks:
  - Pytorch
downloads: 389
stars: 0
---

# anydoclayout

> anydoclayout - anyforge 在 ModelScope 开源的模型。文档布局检测解析

anyforge/anydoclayout 是 ModelScope 魔搭社区上的ocr-recognition、ocr-detection模型，采用 Apache License 2.0 许可。

- **Repository**: anyforge/anydoclayout
- **License**: Apache License 2.0
- **Tasks**: ocr-recognition, ocr-detection
- **Downloads**: 389
- **Stars**: 0
- **Last updated**: 2025-09-16

Source: https://www.modelscope.cn/models/anyforge/anydoclayout

---

## anydoclayout
> docs layout detection

<a href="https://huggingface.co/anyforge/anydoclayout" target="_blank"><img src="https://img.shields.io/badge/%F0%9F%A4%97-HuggingFace-blue"></a>
<a href="https://www.modelscope.cn/models/anyforge/anydoclayout" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/%E9%AD%94%E6%90%AD-ModelScope-blue"></a>
<a href=""><img src="https://img.shields.io/badge/Python->=3.6-aff.svg"></a>
<a href=""><img src="https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg"></a>

```
    _                ____             _                            _
   / \   _ __  _   _|  _ \  ___   ___| |    __ _ _   _  ___  _   _| |_
  / _ \ | '_ \| | | | | | |/ _ \ / __| |   / _` | | | |/ _ \| | | | __|
 / ___ \| | | | |_| | |_| | (_) | (__| |__| (_| | |_| | (_) | |_| | |_
/_/   \_\_| |_|\__, |____/ \___/ \___|_____\__,_|\__, |\___/ \__,_|\__|
               |___/                             |___/

```

- Github：[anydoclayout](https://github.com/anyforge/anydoclayout)
- Hugging Face: [anydoclayout](https://huggingface.co/anyforge/anydoclayout)
- ModelScope: [anydoclayout](https://www.modelscope.cn/models/anyforge/anydoclayout)

![](/models/yolo11s-vis1.jpg)

## 训练数据

### 1. 标签
```python
{0: 'header',
 1: 'title',
 2: 'text',
 3: 'table',
 4: 'figure',
 5: 'formula',
 6: 'footer',
 7: 'pagenum'}
```

### 2. 数据集

- train: 841862 (opendata: 667426, selfgen: 174436)
- eval: 5500
- imgsize：1280

### 3. 评估结果
```python
Class     Images  Instances      Box(P          R)
   all       5500      52274      0.921      0.897
header       1461       2337       0.92      0.878
 title       2308       5473      0.896      0.893 
  text       4149      34156      0.937      0.927
 table       1476       1913      0.946      0.958
figure       1842       3343       0.94       0.94
formula        735       1506      0.881      0.876
footer        745       1157      0.909      0.781
pagenum       2164       2389      0.938      0.919

```

### 如果您想要数据集
- 联系邮箱：christnowx@qq.com


SDK下载
```bash
#安装ModelScope
pip install modelscope
```
```python
#SDK模型下载
from pathlib import Path
from ultralytics import YOLO
from modelscope import snapshot_download
model_dir = snapshot_download('anyforge/anydoclayout')

modelfile = Path(model_dir).joinpath('models/anydoclayout-yolo11s-imgsz1280.pt')
model = YOLO(modelfile)
res = model.predict('your img file', imgsz = 1280)

```

### Buy me a coffee

- 微信(WeChat)

<div align="left">
    <img src="./zanshan.jpg" width="30%" height="30%">
</div>


<p style="color: lightgrey;">如果您是本模型的贡献者，我们邀请您根据<a href="https://modelscope.cn/docs/ModelScope%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5%E6%B5%81%E7%A8%8B%E6%A6%82%E8%A7%88" style="color: lightgrey; text-decoration: underline;">模型贡献文档</a>，及时完善模型卡片内容。</p>
