专为阿拉伯文书籍设计的智能文字识别与结构化提取模型
Arabic-Nougat: Fine-Tuning Vision Transformers for Arabic OCR and Markdown Extraction
- 基于Nougat架构,用合成数据微调出三款阿拉伯文OCR模型
- 最大模型在结构准确率和字符错误率上达到当前最优
- 开源了超10亿词元的阿拉伯文语料库,适合语言研究者使用
我们提出阿拉伯文诺加特(Arabic-Nougat),一套将阿拉伯文图书页面转换为结构化Markdown文本的OCR模型。基于Meta的Nougat架构,包含arabic-small-nougat、arabic-base-nougat和arabic-large-nougat三个专用模型。这些模型在包含13.7k对阿拉伯文图书页面与其对应Markdown表示的合成数据集arabic-img2md上进行微调。关键贡献包括专为高效分词设计的Aranizer-PBE-86k分词器,以及采用torch.bfloat16精度与Flash Attention 2实现的优化训练与推理。实验表明,arabic-large-nougat在Markdown结构准确率和字符错误率上均达当前最佳水平。此外,我们公开了一个大规模数据集,包含超过8,500本书籍中提取的11亿个阿拉伯文词元,为阿拉伯文OCR研究提供宝贵资源。所有模型、数据集及代码均已开源,地址见https://github.com/MohamedAliRashad/arabic-nougat。
原文摘要 · Abstract (English)
We present Arabic-Nougat, a suite of OCR models for converting Arabic book pages into structured Markdown text. Based on Meta's Nougat architecture, Arabic-Nougat includes three specialized models: arabic-small-nougat, arabic-base-nougat, and arabic-large-nougat. These models are fine-tuned on a synthetic dataset, arabic-img2md, comprising 13.7k pairs of Arabic book pages and their Markdown representations. Key contributions include the Aranizer-PBE-86k tokenizer, designed for efficient tokenization, and the use of torch.bfloat16 precision with Flash Attention 2 for optimized training and inference. Our models achieve state-of-the-art performance, with arabic-large-nougat delivering the highest Markdown Structure Accuracy and the lowest Character Error Rate. Additionally, we release a large-scale dataset containing 1.1 billion Arabic tokens extracted from over 8,500 books using our best-performing model, providing a valuable resource for Arabic OCR research. All models, datasets, and code are open-sourced and available at https://github.com/MohamedAliRashad/arabic-nougat.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。