2
$\begingroup$

I've just started to learn CNN and somewhere I have read if I remove the last FCL I will get the features extracted from the input image but... what are those features?

Are they numbers? Labels? An image location (x,y) where there is a line.

I want to use these features on a one shot network, but I can't imagine how to use them if I don't know what they are.

$\endgroup$

1 Answer 1

2
$\begingroup$

You get what we call high-level features, which are basically abstract representations of the parts that carry information in the image you want to classify.

Imagine you want to classify a car. The image you feed your network could be a car on a road with a driver and trees and clouds, etc. The network, however, if you've trained it to recognize cars, will try to focus on parts of the image regarding a car. The final layers will have learned to extract an abstract representation of a car from the image (this means a low-resolution car-like shape). Now your final FC layers will try to classify the image from these high-level features. In this example, you would have an FC layer that learns to classify a car if this this abstract car-like figure is present in the image. Likewise, if it isn't present it won't classify it as a car. By accessing these high-level features, you essentially have a more compact and meaningful representation of what the image represents (based always on the classes that the CNN has been trained on).

By visualizing the activations of these layers we can take a look on what these high-level features look like.

The top row here is what you are looking for: the high-level features that a CNN extracts for four different image types.

$\endgroup$
7
  • 1
    $\begingroup$ Do activations really tell you something about the features? How come that a number (the activation) can tell you something regarding a high-level feature? Which high-level feature? I think your answer would improve if you add more details about this. Pedagogically, I think it is better to only say that a CNN only transforms the image with non-linear transforms and you should emphasize that this extraction of high-level features is just an interpretation of the inner workings. $\endgroup$
    – nbro
    Oct 28, 2019 at 22:51
  • $\begingroup$ I agree with you, an activation by itself can't tell you anything. But if you see how this activation changes you can get a better understanding of how that CNN works (and that's what I think the question was about). $\endgroup$
    – Djib2011
    Oct 29, 2019 at 8:11
  • $\begingroup$ So, the convolutional layers reduce the input to get only the more relevant features from the image, and then the fully connected layer classify the image using those features, isn't it? I think I've just understood how a CNN works. $\endgroup$
    – VansFannel
    Oct 29, 2019 at 18:23
  • $\begingroup$ @VansFannel on a very high-level yes. $\endgroup$
    – Djib2011
    Oct 29, 2019 at 19:39
  • $\begingroup$ @Djib2011 and on a very low or low level? Where can I find information about how CNN works? I only find on a very high-level description about them and how to implement them with TensorFlow. Thanks! $\endgroup$
    – VansFannel
    Oct 30, 2019 at 14:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .