Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing clstm's network architecture in Keras #115

Open
Zerithious opened this issue Dec 5, 2016 · 10 comments
Open

Implementing clstm's network architecture in Keras #115

Zerithious opened this issue Dec 5, 2016 · 10 comments
Labels

Comments

@Zerithious
Copy link

I wish to implement clstm's network architecture in Keras, to facilitate extension and modifications to the network, and also to add gpu support.

I'm pretty much a newbie to NNs, and I'm trying to wrap my head around the code and the inner workings of clstm. It would greatly help my effort if someone can answer these questions:

  1. What is the exact architecture/topology of the network implemented in clstm? (I mean, what layers, what do they consist of and in which order).

  2. How does it encode the images to be used as input to the network? Is it just the raw pixels of the image with varying width/height?

  3. What other things would I need to know in order to implement this in Keras or a similar framework like tensorflow?

@zuphilip
Copy link
Collaborator

zuphilip commented Dec 5, 2016

@tmbdev Tom, maybe you can share some insights for this questions. Moreover, I think you are already doing something with tensorflow.

@amitdo
Copy link
Contributor

amitdo commented Dec 6, 2016

How does it encode the images to be used as input to the network?
Is it just the raw pixels of the image with varying width/height?

Yes. it takes raw pixels as input. The width is always 1 and the height is fixed - by default to 48.

@amitdo
Copy link
Contributor

amitdo commented Dec 6, 2016

You might want to look at ocropy's lstm.py code, because I think it will be easier to understand. It was written by the same author who wrote clstm.

@mittagessen
Copy link
Contributor

mittagessen commented Dec 6, 2016

Keras already implements/utilizes LSTM nets (the network architecture) and Connectionist Temporal Classification (the loss function used for training) from both theano and tensorflow. See keras-team/keras#3436 for more details.

The only thing that's not part of keras is the preprocessing of line images, chiefly dewarping (see lineest.py) whose utility is somewhat questionable as I trained perfectly working models without it.

@tmbdev
Copy link
Owner

tmbdev commented Dec 7, 2016

I already have an LSTM-based OCR for TensorFlow that works like CLSTM, but TensorFlow (and by extension, Keras) support for LSTMs is still less than ideal.

@Zerithious
Copy link
Author

@tmbdev Can you link to the repo containing the tensorflow code? Did you mean this?

@tmbdev
Copy link
Owner

tmbdev commented Dec 8, 2016

No, that's a multidimensional add-on to TensorFlow. The LSTM code is experimental and in a bunch of iPython notebooks. I'm working on a Torch version right now, which I think will work better.

@wanghaisheng
Copy link

@tmbdev any progress ?

@rayush7
Copy link

rayush7 commented Apr 3, 2017

@tmbdev I am also interested in torch or tensorflow/keras based implementation of clstm. Is there any update from your end?

@chinakook
Copy link
Contributor

chinakook commented Apr 18, 2017

A tensorflow implementation of popular library CLSTM and OCROPY line reader
https://github.com/ferjad/tlstm
Does anyone want to modify the repository to the cudnnLSTM or cudnnPersistentRNN implementation, by which the training could speed up about 6x to 10x times ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants