Check the blog post.
Install pdflatex (latex to pdf) and ghostsript + magick (pdf to png) on Linux
(takes a while ~ 10 min, installs from source)
On Mac, assuming you already have a LaTeX distribution installed, you should have pdflatex and ghostscript installed, so you just need to install magick. You can try
We provide a small dataset just to check the pipeline. To build the images, train the model and evaluate
You should observe that the model starts to produce reasonable patterns of LaTeX after a few minutes.
We provide the pre-processed formulas from Harvard but you'll need to produce the images from those formulas (a few hours on a laptop).
If you already did
make build you can just train and evaluate the model with the following commands
make train make eval
Or, to build the images from the formulas, train the model and evaluate, run
python build.py --data=configs/data.json --vocab=configs/vocab.json
python train.py --data=configs/data.json --vocab=configs/vocab.json --training=configs/training.json --model=configs/model.json --output=results/full/
python evaluate_txt.py --results=results/full/
python evaluate_img.py --results=results/full/
(To get more information on the arguments, run)
python file.py --help