【论文+公式ocr+代码】2308.Nougat_Neural Optical Understanding for Academic Documents (Meta AI 学术pdf识别)

【论文+公式ocr+代码】2308.Nougat_Neural Optical Understanding for Academic Documents (Meta AI 学术pdf识别)_第1张图片

主要参考

论文原文学术文档的识别:2308. Nougat_Neural Optical Understanding for Academic Documents
机器之心报道:Meta推出OCR神器,PDF、数学公式都能转
演示地址:https://facebookresearch.github.io/nougat/
github 模型下载: https://github.com/facebookresearch/nougat/releases
pdf 输出格式mathpix makedown语法以及转换说明:https://github.com/Mathpix/mathpix-markdown-it

先导知识

  1. Transformer :李沐 Transformer论文逐段精读【论文精读】
  2. Swin Transforme: 2103.Hierarchical Vision Transformer using Shifted Windows | 中文解读

能用来做什么?

  • 识别学术文档 PDF格式中文字、公式,
  • 是被复杂的数学公式
  • 不包含图片
  • 输入PDF ,
  • 输出.mmd 的轻量标记语言
    • 用 vscode插件 编辑打开)
    • 使用 web框架-React 、NodeJS 进行渲染和后续显示:https://github.com/mathpix/mathpix-markdown-it
    • 主要与 Mathpix Markdown 兼容(论文使用 LaTeX 表)
    • Mathpix 官网进行使用,转换效果比本论文模型好:What is Mathpix Markdown?

如何训练得到?

使用了800万页的pdf的数据,

从 arXiv 上开放获取的文章中创建了自己的数据集。为
PubMed Central (PMC) 开放访问非商业数据集的一个子集。
部分行业文档库 (IDL)。

数据集处理方法

【论文+公式ocr+代码】2308.Nougat_Neural Optical Understanding for Academic Documents (Meta AI 学术pdf识别)_第2张图片

模型

transformer 编解码结构
基于Donut : 2111. OCR-free Document Understanding Transformer模型改进的
【论文+公式ocr+代码】2308.Nougat_Neural Optical Understanding for Academic Documents (Meta AI 学术pdf识别)_第3张图片

运行代码测试 (1660ti)

https://github.com/facebookresearch/nougat

python predict.py   your_pdf.pdf  --batchsize=1  --out=./out

输出结果

没有图片,结果需要在vscode安装插件mathpix后展示
【论文+公式ocr+代码】2308.Nougat_Neural Optical Understanding for Academic Documents (Meta AI 学术pdf识别)_第4张图片

vscode插件展示

【论文+公式ocr+代码】2308.Nougat_Neural Optical Understanding for Academic Documents (Meta AI 学术pdf识别)_第5张图片

官方例子,融入到html上

【论文+公式ocr+代码】2308.Nougat_Neural Optical Understanding for Academic Documents (Meta AI 学术pdf识别)_第6张图片

附录: 什么是mathmarkdown ?

https://mathpix.com/docs/mathpix-markdown/overview

通过 LaTeX 语法(由 MathJax 提供支持)提供更好的方程支持,包括 LaTeX 的方程编号和引用约定
通过 LaTeX 表格语法更好地支持表格,允许使用科学出版物中常见的复杂嵌套表格
通过 LaTeX 语法进行高级图形引用
支持摘要、作者列表和可链接部分;这些是学术出版物的现实
支持以 SMILES 标记表示的化学图表,与 Chemdraw 等流行的化学工具兼容
支持图像:解析和渲染附加参数,例如宽度、高度、对齐方式
支持定理和证明

【论文+公式ocr+代码】2308.Nougat_Neural Optical Understanding for Academic Documents (Meta AI 学术pdf识别)_第7张图片

你可能感兴趣的:(计算机视觉相关,论文解读,mathpix,transforner,pdf识别,公式识别,nougat,ocr)