面向数学公式与文本的图像到LaTeX转换器
Image-to-LaTeX Converter for Mathematical Formulas and Text
AI总结:
本文构建并微调了基于Swin Transformer和GPT-2的图像到LaTeX转换模型,结合LoRA适配手写公式,并通过BLEU对比验证其性能,同时开源模型与分布式训练代码。
摘要:
在本项目中,我们训练一个视觉编码器-解码器模型,从数学公式和文本图像生成LaTeX代码。利用多样化的图像到LaTeX数据集,我们构建了两个模型:一个基础模型,采用Swin Transformer编码器和GPT-2解码器,在机器生成的图像上训练;以及一个经过微调的版本,使用Low-Rank Adaptation (LoRA)在手写公式上增强训练。然后,我们将该专用模型在手写测试集上的BLEU性能与其他类似模型(如Pix2Text、TexTeller和Sumen)进行比较。通过本项目,我们贡献了用于将图像转换为LaTeX的开源模型,并提供了从零开始构建这些模型的代码,支持分布式训练和GPU优化。
英文摘要:
In this project, we train a vision encoder-decoder model to generate LaTeX code from images of mathematical formulas and text. Utilizing a diverse collection of image-to-LaTeX data, we build two models: a base model with a Swin Transformer encoder and a GPT-2 decoder, trained on machine-generated images, and a fine-tuned version enhanced with Low-Rank Adaptation (LoRA) trained on handwritten formulas. We then compare the BLEU performance of our specialized model on a handwritten test set with other similar models, such as Pix2Text, TexTeller, and Sumen. Through this project, we contribute open-source models for converting images to LaTeX and provide from-scratch code for building these models with distributed training and GPU optimizations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。