uptodiff / Watch-Attend-and-Parse-tensorflow-version

This is a tensorflow-based version of JianzhuZhang's Watch Attend and Parse model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Watch-Attend-and-Parse-tensorflow-version

pic1 pic2

This project is a tensorflow implementation of the DenseNet model provided by jianshu's Github.

Mainly based on his two papers:

Watch, attend and parse: An end-to-end neural network based approach to handwritten mathematical expression recognition

Multi-Scale Attention with Dense Encoder for Handwritten Mathematical Expression Recognition.

In jianshu's model, the codes are in Theano, then I convert the codes into tensorflow version and the performance is comparative with jianshu's best model provided in his github. The performance of the codes can achieve 44%-45% ExpRate on single Tesla K80 GPU. The final results reported in jianshu's papers are obtained after five models ensembling. And the performance reported on single model is almost the same as ours as jianshu stated in his github issues

Requirements

  • Tensorflow v1.6
  • Python 3
  • cuda 9.0 [optional]
  • cudnn 7 [optional]

Usage

python model-single-GPU.py  --batch_size=4

Validation on offline-test.pkl

pic3

Tips to run the codes

If OOM Error occurs, please set batch_size to 4 or 2

About

This is a tensorflow-based version of JianzhuZhang's Watch Attend and Parse model


Languages

Language:Python 100.0%