Computer Vision: CNNs for Images. Why?

Rahul S
2 min readAug 17, 2023

--

Start with this article, if you need a refresher oN CNNs:

Convolutional layers are preferred over fully connected layers for processing images in neural networks due to their ability to capture local spatial patterns and reduce the number of parameters. Here’s why:

  1. Local Connectivity: Images have a spatial structure, meaning that nearby pixels are often related to each other. Convolutional layers exploit this property by using small filters that slide across the image to capture local patterns. This local connectivity allows the network to learn features like edges, textures, and simple shapes, which are building blocks for more complex features.
  2. Parameter Sharing: In convolutional layers, the same set of weights (filter) is applied at different spatial locations of the input. This sharing of parameters reduces the total number of parameters compared to fully connected layers, which have connections between every input and output neuron. This parameter sharing helps prevent overfitting, as it enforces some degree of translation invariance.
  3. Translational Invariance: Convolutional layers inherently possess translation invariance. This means that they can detect features regardless of their exact position in the image. For example, if a specific pattern is present in one corner of the image, a convolutional filter can detect the same pattern in another corner without needing to learn the same feature from scratch.
  4. Hierarchical Representation: Convolutional networks are designed to learn hierarchical representations of features. Lower layers capture simple features like edges, while higher layers learn to combine these features to form more complex ones, eventually leading to object recognition.
  5. Reduced Computational Load: Fully connected layers require connecting every neuron from the previous layer to every neuron in the current layer, leading to a high number of parameters. In contrast, the use of small filters in convolutional layers significantly reduces the…

--

--