Solved – Automatic Feature Extraction in Caffe

machine learning

I am a beginner to frameworks like Caffe, Theano for deep learning. But, I would like to know how do I use Caffe framework for only feature extraction without performing classification. I want the feature vector which is input to the deep neural network for classification.

I want to perform automatic feature extraction for several images.
The output for this task should be a text file containing :

image_name1, feature_vector1
image_name1, feature_vector1
image_name1, feature_vector1
...

Kindly help me with this.
Thanks in advance.

Best Answer

You can use either the mnist autoencoder example as a semi-supervised approach to extract features or if you have a labeled data you can train a regular CNN (e.g., Alexnet) then extract the output of each layer as an output feature.

For the latter approach you can have a look at this post and this tutorial.