10000 GitHub - razzaghi/mathkicker-latex-ocr: Finetune a model to convert math formula to latex code
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

razzaghi/mathkicker-latex-ocr

 
 

Repository files navigation

Nougat-LaTeX-OCR

Mathkicker-Nougat-LaTeX-based is fine-tuned from facebook/nougat-base with [im2latex-100k] and a custom dataset to boost its proficiency in generating LaTeX code from images.

Uses

fine-tune on your customized dataset

  1. Prepare your dataset in this format
  2. Change config/base.yaml
  3. Run the training script
python tools/train_experiment.py --config_file config/base.yaml --phase 'train'

predict

  1. Download the model
  2. Install dependency
pip install -r all_requirements.txt
  1. You can find an example in examples folder
python examples/run_latex_ocr.py --img_path "examples/test_data/eq1.png"

QA

  • Q: Why did you copy and place the image_processor_nougat.py file in the repository rather than simply importing it from the transformers library if there are no changes compared to the one in huggingface/transformers?

  • A: transformers 4.34.0 is the first version that natively supports the nougat. However, there is a bug in the nougat processor within this version, which can result in a run failure. You can review the details of this issue here. Fortunately, the developers have already addressed this bug, and I anticipate that you will be able to directly import it from transformers in the next released version.

please consider leaving me a star if you find this repo helpful :)

About

Finetune a model to convert math formula to latex code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0