In computer vision, convolutions are so attractive for image processing tasks. What make it suitable for image processing?
3 Answers
Why convolutions? First let's look at alternative, using standard (fully connected) layers.
Drawbacks of using fully connected layers on image input
- FC layers don't exploit local structure
- FC layer is not equivariant under translation (translated pattern can correspond to completely different feature)
- For big images FC layers have huge number of parameters (for example for 1000 hidden units, 1000 x 1000 x 3 image such layer has ~3 billion weights)
In contrast to that, CNN layers:
- Extract local features (conv layer outputs only depend on adjacent pixels of previous layer)
- Are equivariant to translation
- Have lot less parameters, since they share kernel over the patches of whole input image
In addition to that, CNN networks use pooling layers, which provide (some) translation invariance (pooling makes each feature more and more invariant to translation).
If you're unsure about equivariance/invariance, I'd recommmend reading these Hinton's slides. They have pictorial explanation of what it means for features to be equivariant (and also more details on the other points I mentioned).
-
$\begingroup$ Moving deeper in the cnn, the receptive field is increased. How a cnn extract local features in this case? $\endgroup$ Commented Oct 5, 2023 at 22:09
-
$\begingroup$ Well it extracts these features at lower levels. The point is we can control this receptive field using pooling. $\endgroup$ Commented Oct 6, 2023 at 8:55
-
$\begingroup$ So can we say that they extract local features, with the locality increasing the deeper we go into the network (due to the increase in the reciptive field)? Whereas a neuron in a MLP always look at the whole image irrespective in which layer it is? $\endgroup$ Commented Oct 6, 2023 at 9:57
-
$\begingroup$ They extract local features because the convolution is local. The nonlocality increases because the max pooling sort of coarse grains the image. In the MLP what you mentioned happens at the first layer - note that the following layers layers don't even know the input was image, they only see last hidden states! $\endgroup$ Commented Oct 6, 2023 at 22:47
Convolution has proven to be useful in image processing for at least 40 years. That is why it is popular and also the reason to use convolutional layers in deep learning with images during the last 5 years or so.
A better answer to your question would require much more biology than is on this site. But you can check this out if it interests you.
Image processing is now dominated by the application of convolutional neural networks. Introduction of convolutional and pooling units to our network structure allows us reduce the number of parameters in a large network and take advantage of data structure.
Pooling is a simple dimensionality reduction technique that is almost always used in combination with convolutional layers in CNNs. A pooling layer is defined by a size and a stride.