luopeixiang / Im2latex
Licence: mit
Pytorch implemention of Deep CNN Encoder + LSTM Decoder with Attention for Image to Latex
Stars: ✭ 84
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Im2latex
Deeplearningmugenknock
でぃーぷらーにんぐを無限にやってディープラーニングでDeepLearningするための実装CheatSheet
Stars: ✭ 684 (+714.29%)
Mutual labels: seq2seq
English2cypher
A model to transform english into Cypher queries, based off the CLEVR-graph dataset
Stars: ✭ 54 (-35.71%)
Mutual labels: seq2seq
Augmented seq2seq
enhance seq2seq model for open ended dialog generation
Stars: ✭ 29 (-65.48%)
Mutual labels: seq2seq
Practical seq2seq
A simple, minimal wrapper for tensorflow's seq2seq module, for experimenting with datasets rapidly
Stars: ✭ 563 (+570.24%)
Mutual labels: seq2seq
Sockeye
Sequence-to-sequence framework with a focus on Neural Machine Translation based on Apache MXNet
Stars: ✭ 990 (+1078.57%)
Mutual labels: seq2seq
Seq2seq Signal Prediction
Signal forecasting with a Sequence-to-Sequence (seq2seq) Recurrent Neural Network (RNN) model in TensorFlow - Guillaume Chevalier
Stars: ✭ 890 (+959.52%)
Mutual labels: seq2seq
Keras Question And Answering Web Api
Question answering system developed using seq2seq and memory network model in Keras
Stars: ✭ 21 (-75%)
Mutual labels: seq2seq
Cluener2020
CLUENER2020 中文细粒度命名实体识别 Fine Grained Named Entity Recognition
Stars: ✭ 689 (+720.24%)
Mutual labels: seq2seq
Sequence To Sequence 101
a series of tutorials on sequence to sequence learning, implemented with PyTorch.
Stars: ✭ 62 (-26.19%)
Mutual labels: seq2seq
Seq2seq Pytorch
Sequence to Sequence Models with PyTorch
Stars: ✭ 678 (+707.14%)
Mutual labels: seq2seq
Tensorflow Seq2seq Dialogs
Build conversation Seq2Seq models with TensorFlow
Stars: ✭ 43 (-48.81%)
Mutual labels: seq2seq
Ai Writer data2doc
PyTorch Implementation of NBA game summary generator.
Stars: ✭ 69 (-17.86%)
Mutual labels: seq2seq
Pointer Networks Experiments
Sorting numbers with pointer networks
Stars: ✭ 53 (-36.9%)
Mutual labels: seq2seq
Im2Latex
Deep CNN Encoder + LSTM Decoder with Attention for Image to Latex, the pytorch implemention of the model architecture used by the Seq2Seq for LaTeX generation
Sample results from this implemention
Experimental results on the IM2LATEX-100K test dataset
BLUE-4 | Edit Distance | Exact Match |
---|---|---|
40.80 | 44.23 | 0.27 |
Getting Started
Install dependency:
pip install -r requirement.txt
Download the dataset for training:
cd data
wget http://lstm.seas.harvard.edu/latex/data/im2latex_validate_filter.lst
wget http://lstm.seas.harvard.edu/latex/data/im2latex_train_filter.lst
wget http://lstm.seas.harvard.edu/latex/data/im2latex_test_filter.lst
wget http://lstm.seas.harvard.edu/latex/data/formula_images_processed.tar.gz
wget http://lstm.seas.harvard.edu/latex/data/im2latex_formulas.norm.lst
tar -zxvf formula_images_processed.tar.gz
Preprocess:
python preprocess.py
Build vocab
python build_vocab.py
Train:
python train.py \
--data_path=[data dir] \
--save_dir=[the dir for saving ckpts] \
--dropout=0.2 --add_position_features \
--epoches=25 --max_len=150
Evaluate:
python evaluate.py --split=test \
--model_path=[the path to model] \
--data_path=[data dir] \
--batch_size=32 \
--ref_path=[the file to store reference] \
--result_path=[the file to store decoding result]
Features
- [x] Schedule Sampling from Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks
- [x] Positional Embedding from Attention Is All You Need
- [x] Batch beam search
- [x] Training from checkpoint
- [ ] Improve the code of data loading for cpu/cuda memery efficiency
- [ ] Finetune hyper parameters for better performance
- [ ] A HTML Page allowing upload picture to decode
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].