I'm trying to extract features of set of images. I'm using CNN from this site.
Can anyone please tell me how to do feature extraction of images using CNN? I looked for various places. But nowhere it's clearly mention the feature extraction part.
I'm trying to extract features of set of images. I'm using CNN from this site.
Can anyone please tell me how to do feature extraction of images using CNN? I looked for various places. But nowhere it's clearly mention the feature extraction part.
Actually, after you've completed your training, the weights of all these convolution layers are the feature maps you've extracted.
You may try to visualize these weights as well as activations to get the full feature maps. Here's a guide you may refer to.
CNN feature extraction in TensorFlow is now made easier using the tensorflow/models repository on Github. There are pre-trained VGG, ResNet, Inception and MobileNet models available here.
I have used the following wrapper for convenient feature extraction in TensorFlow. You can just provide the tool with a list of images. It will pre-process the images and extract the features by feed-forwarding through the network. You can specify the layer names that you want to extract and save them to HDF5 or pickle afterwards.
You can imagine convolution as the mixing of information. Imagine two buckets full of information which are poured into one single bucket and then mixed according to a specific rule.
In order to extract the features of the image, CNN uses what is known as a kernel over each image and adjust the kernel as per the propagation in the network. A kernel is then convolved over the entire image to produce what are known as feature maps. You can visualize a feature map as something like this :
As the layers becomes deeper and deeper, the network acquires the knowledge of larger and larger feature extraction. The initial layers takes care of the smaller details of the image and deeper layer are able to identify the the bigger picture. These images by adeshpande3 gives a very conscience explanation about what is happening at each layer.
You may refer to timdettmers blog and then to Adesh pande's blog. They give a lucid explanation about CNNs.