Convolutional Neural Networks
(Heavily from https://uk.mathworks.com/discovery/convolutional-neural-network.html)
A convolutional neural network (CNN or ConvNet) is a network architecture for deep learning that learns directly from data.
CNNs are particularly useful for finding patterns in images to recognize objects, classes, and categories. They can also be quite effective for classifying audio, time series, and signal data.
How CNNs Work
A convolutional neural network can have tens or hundreds of layers that each learn to detect different features of an image. Filters are applied to each training image at different resolutions, and the output of each convolved image is used as the input to the next layer. The filters can start as very simple features, such as brightness and edges, and increase in complexity to features that uniquely define the object.
Feature Learning, Layers, and Classification
A CNN is composed of an input layer, an output layer, and many hidden layers in between.
These layers perform operations that alter the data with the intent of learning features specific to the data. Three of the most common layers are convolution, activation or ReLU, and pooling.
- Convolution puts the input images through a set of convolutional filters, each of which activates certain features from the images.
- Rectified linear unit (ReLU) allows for faster and more effective training by mapping negative values to zero and maintaining positive values. This is sometimes referred to as activation, because only the activated features are carried forward into the next layer.
- Pooling simplifies the output by performing nonlinear downsampling, reducing the number of parameters that the network needs to learn.
These operations are repeated over tens or hundreds of layers, with each layer learning to identify different features.
Classification Layers
After learning features in many layers, the architecture of a CNN shifts to classification.
The next-to-last layer is a fully connected layer that outputs a vector of K dimensions (where K is the number of classes able to be predicted) and contains the probabilities for each class of an image being classified.
And the final layer of the CNN architecture uses a classification layer to provide the final classification output.
Why CNNs Matter
CNNs provide an optimal architecture for uncovering and learning key features in image and time series data. CNNs are a key technology in applications such as:
- Medical Imaging CNNs can examine thousands of pathology reports to visually detect the presence or absence of cancer cells in images.
- Audio Processing Keyword detection can be used in any device with a microphone to detect when a certain word or phrase is spoken (“Hey Siri!”). CNNs can accurately learn and detect the keyword while ignoring all other phrases regardless of the environment.
- Object Detection Automated driving relies on CNNs to accurately detect the presence of a sign or other object and make decisions based on the output.
- Synthetic Data Generation Using Generative Adversarial Networks (GANs), new images can be produced for use in deep learning applications including face recognition and automated driving.
When Should You Use CNNs?
Consider using CNNs when you have a large amount of complex data (such as image data). You can also use CNNs with signal or time series data when preprocessed to work with the network structure.