Commit ffe14fdd authored by Yann SOULLARD's avatar Yann SOULLARD

README update

parent f4562038
......@@ -11,10 +11,12 @@ It directly inherits from the traditionnal Keras 2 Model and uses the TensorFlow
- Tensorflow
## Installation
$ git clone https://github.com/litislab/CTCModel
$ git clone https://github.com/litislab/CTCModel
$ cd CTCModel
## Getting started
Example of a standard recurrent neural network with CTCModel in Keras.
<code>
from keras.layers import LSTM, TimeDistributed, Dense, Activation, Input
from keras.optimizers import Adam
......@@ -44,6 +46,7 @@ The standard inputs x and y of a Keras Model, where x is the observations and y
Here, y is not used in a standard way and must be defined for Keras methods (as the labels or an empty structure of length equal to the length of labels).
Let *x_train*, *y_train*, *x_train_len* and *y_train_len* those terms. Fit, evaluate and predict methods can be used as follow:
<code>
model.fit(x=[x_train,y_train,x_train_len,y_train_len], y=zeros(nb_train), batch_size=64)
&nbsp;
......@@ -54,7 +57,7 @@ model.predict([x_test, x_test_len])
## Under the hood
CTCModel works by adding three additionnal output layers to a recurrent network for computing the CTC loss, decoding and evaluating using standard metrics for sequence analysis (the sequence error rate and label error rate). Each one can be applied in a blind manner, by the use of standard Keras methods such as *fit*, *predict* and *evaluate*. Note that methods based on generator have been defined and can be used in a standard way provided that input x and label y that are return by the generator have the specific structure seen above.
CTCModel works by adding three additionnal output layers to a recurrent network for computing the CTC loss, decoding and evaluating using standard metrics for sequence analysis (the sequence error rate and label error rate). Each one can be applied in a blind manner, by the use of standard Keras methods such as *fit*, *predict* and *evaluate*. Note that methods based on generator have been defined and can be used in a standard way, provided that input x and label y that are return by the generator have the specific structure seen above.
Except the three specific layers, CTCModel works as a standard Keras Model and most of the overriden methods just select the right output layer and call the related Keras Model method. There is also additional methods to save or load model parameters and other ones to get specific computations, e.g. the loss using *get_loss* or the input probabilities using *get_probas* (and the related *on_batch* and *generator* methods).
......@@ -62,7 +65,7 @@ Except the three specific layers, CTCModel works as a standard Keras Model and m
CTCModel was developped at the LITIS laboratory, Normandie University (http://www.litislab.fr) by Cyprien RUFFINO and Yann SOULLARD, under the supervision of Thierry PAQUET.
CTCModel is under the terms of the GPL-3.0 licence.
<!--
If you use CTCModel for research purposes, please consider adding the following citation to your paper:
<code>
......@@ -73,7 +76,8 @@ title = {{CTCModel : nom de l'article}},
year = {2017}
}
</code>
--!>
## References
F. Chollet et al.. Keras: Deep Learning for Python, https://github.com/keras-team/keras, 2015.
F. Chollet et al.. Keras: Deep Learning for Python, https://github.com/keras-team/keras, 2015.
A. Graves, S. Fernández, F. Gomez, J. Schmidhuber. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In Proceedings of the 23rd international conference on Machine learning (pp. 369-376). ACM, June 2006.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment