This is the repository for the replication of "Introducing Local Distance-Based Features to Temporal Convolutional Neural Networks" by B. K. Iwana, M. Mori, A. Kimura, and S. Uchida.
Python >= 3.0
TensorFlow >= 1.4
Numpy >= 1.13.3
scikit-learn 0.19.1 (for test files only)
Included in the repository are the Unipen 1a, 1b, and 1c datasets.
To train the models, first you need to generate the DTW features.
python3 generate_dataset.py
To train a network use:
python3 cnn-[raw|dtwfeatures|earlyfusion|midfusion|latefusion].py [test|train] [dataset] [1d|2d] [conv width]
Where,
- [raw|dtwfeatures|earlyfusion|midfusion|latefusion] refers to the Network Type
- [test|train] train the network or test the network.
- [1d|2d] is 1D or 2D Convolutions
- [dataset] is either "1a", "1b", or "1c" and refers to the Unipen dataset.
- 1a: digits
- 1b: uppercase characters
- 1c: lowercase characters.
- [conv width] is the width of the convolution.
- For 1D convolutions: [conv width] x dimensionality of the data (Width x Channel).
- For 2D convolutions: 1 x [conv width] x dimensionality of the data (Height x Width x Channel).
Example:
python3 cnn-midfusion.py train 1a 2d 3
which results in a feature-level fusion (midfusion) network with 2D convolutions using Unipen 1a (digits) with a convolution size of (3, 1)
Same parameters as train
Example:
python3 cnn-midfusion.py test 1a 2d 3
B. K. Iwana, M. Mori, A. Kimura, and S. Uchida, "Introducing Local Distance-Based Features to Temporal Convolutional Neural Networks," in Int. Conf. Frontiers in Handwriting Recognition, 2018.
@article{iwana2018introducing,
title={Introducing Local Distance-Based Features to Temporal Convolutional Neural Networks
},
author={Iwana, Brian Kenji and Mori, Minoru and Kimura, Akisato and Uchida, Seiichi},
booktitle={Int. Conf. Frontiers in Handwriting Recognition},
year={2018}
}