Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Classification of Images with Recurrent Neural Networks

I'm trying to look for the classification of images with labels using RNN with custom data. I can't find any example other than the Mnist dataset. Any help like this repository where CNN is used for classification would be grateful. Any help regarding the classification of images using RNN would be helpful. Trying to replace the CNN network of the following tutorial.

like image 518
Albab A. Khan Avatar asked Mar 26 '18 06:03

Albab A. Khan


1 Answers

Aymericdamien has some of the best examples out there, and they have an example of using an RNN with images.

https://github.com/aymericdamien/TensorFlow-Examples

https://github.com/aymericdamien/TensorFlow-Examples/blob/master/notebooks/3_NeuralNetworks/recurrent_network.ipynb

The example is using MNIST, but it can be applied to any image.

However, I'll point out that you're unlikely to find many examples of using an RNN to classify an image because RNNs are inferior to CNNs for most image processing tasks. The example linked to above is for educational purposes more than practical purposes.

Now, if you are attempting to use an RNN because you have a sequence of images you wish to process, such as with a video, in this case a more natural approach would be to combine both a CNN (for the image processing part) with an RNN (for the sequence processing part). To do this you would typically pretrain the CNN on some classification task such as Imagenet, then feed the image through the CNN, then the last layer of the CNN would be the input to each timestep of an RNN. You would then let the entire network train with the loss function defined on the RNN.

like image 55
David Parks Avatar answered Sep 25 '22 15:09

David Parks