11 CNN
Feed Forward Networks
Structure:
Input layer
Hidden layers (multiple)
Output layer
Definition:
Deep networks have several hidden layers.
Connection:
Each neuron on one layer is fully connected to all neurons in the previous layer (dense connections).
Convolutional Neural Networks (CNN)
Purpose:
Primarily designed for image classification.
Evolution:
Significant advancements in the last decade for automatic image classifiers.
Key Features:
Excellent at feature extraction (e.g., lines, colors).
Applications of CNNs
Image recognition applications:
Automatic license plate recognition
Face recognition
Security systems
Challenge:
Distinguishing colors and features in images (e.g., blue area that could be sky or lake).
Feature Extraction in CNNs
Mechanism:
CNNs use multiple filters to detect features at different layers.
Example Process:
Initial filters identify basic features (e.g., edges).
Subsequent layers combine features to recognize complex shapes (e.g., eyes, ears).
Filters:
A filter is a matrix applied to image patches to detect specific features.
Filter Application
Process:
The filter is slid over the image, applying dot product calculations.
Output of filter applications creates feature maps.
Learnable Filters:
All neurons in a layer use the same filter, unlike dense networks where each neuron learns unique parameters.
Spatial dimensions in CNNs
Example Calculation:
A 6x6 input map and a 3x3 filter will produce a 4x4 output map.
Problem with Edges:
Borders of the image receive less attention in filter application.
Solutions in CNNs
Padding:
Adding hypothetical values around the image to maintain feature integrity at edges, leading to equal input and output dimensions.
Stride:
Determines movement of filters across the image (e.g., moving 2 pixels instead of 1 reduces dimensionality faster).
Pooling Layers:
Typically used in CNNs after convolutional layers to reduce dimensions and extract significant features.