arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.17835cs.CLcs.AIcs.CV
收藏

Arabic-Nougat:微调视觉Transformer用于阿拉伯语OCR和Markdown提取

Arabic-Nougat: Fine-Tuning Vision Transformers for Arabic OCR and Markdown Extraction

Faculty of Engineering Ain Shams University(艾因夏姆斯大学工程学院)

Mohamed Rashad

AI总结:

本文提出Arabic-Nougat——基于Meta的Nougat架构微调的阿拉伯语OCR模型套件,含三个专用模型,在合成数据集arabic-img2md上训练,还贡献了Aranizer-PBE-86k分词器,模型性能领先且相关资源开源。

摘要:

我们提出Arabic-Nougat,这是一套将阿拉伯语书页转换为结构化Markdown文本的OCR模型。基于Meta的Nougat架构,Arabic-Nougat包含三个专用模型:arabic-small-nougat、arabic-base-nougat和arabic-large-nougat。这些模型在合成数据集arabic-img2md上进行微调,该数据集包含13.7k对阿拉伯语书页及其Markdown表示。主要贡献包括用于高效分词的Aranizer-PBE-86k分词器,以及使用torch.bfloat16精度和Flash Attention 2优化训练和推理。我们的模型实现了最先进的性能,其中arabic-large-nougat的Markdown结构准确率最高,字符错误率最低。此外,我们使用性能最佳的模型发布了一个包含11亿阿拉伯语标记的大规模数据集,该数据集从8500多本书中提取,为阿拉伯语OCR研究提供了宝贵资源。所有模型、数据集和代码均已开源,可在https://github.com/MohamedAliRashad/arabic-nougat获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑