What Is a Convolutional Neural Network? | 3 things you need to know (2024)

3 things you need to know

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.

Table of Contents

  • How CNNs Work
  • Why CNNs Matter
  • CNNs with MATLAB

Tutorials and examples

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.

What are convolutional neural networks? 4:44Video length is 4:44

What are convolutional neural networks?

How do CNNs work? Watch this short video with the specifics of CNNs, including layers, activations, and classification.

Get Started with Examples

Create a Simple Deep Learning Network for Classification

Object Detection Using YOLO v3 Deep Learning

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.

Example of a network with many convolutional layers. 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.

Shared Weights and Biases

Unlike a traditional neural network, a CNN has shared weights and bias values, which are the same for all hidden neurons in a given layer.

This means that all hidden neurons are detecting the same feature, such as an edge or a blob, in different regions of the image. This makes the network tolerant to translation of objects in an image. For example, a network trained to recognize cars will be able to do so wherever the car is in the image.

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.

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:

What Is a Convolutional Neural Network? | 3 things you need to know (6)

Medical Imaging: CNNs can examine thousands of pathology reports to visually detect the presence or absence of cancer cells in images.

What Is a Convolutional Neural Network? | 3 things you need to know (7)

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.

What Is a Convolutional Neural Network? | 3 things you need to know (8)

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.

What Is a Convolutional Neural Network? | 3 things you need to know (9)

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.

See these examples for working with signals and CNNs:

Classify Time Series Using Wavelet Analysis and Deep Learning

Sequence Classification Using 1-D Convolutions

Consider Using Pretrained Models

When working with CNNs, engineers and scientists prefer to initially start with a pretrained model and that can be used to learn and identify features from a new data set.

See tips on choosing a pretrained model

Models like GoogLeNet, AlexNet, and Inception provide a starting point to explore deep learning, taking advantage of proven architectures built by experts.

New Deep Learning Models and Examples

See a list of all available modes and explore new models by category.

CNNs with MATLAB

Using MATLAB® with Deep Learning Toolbox™ enables you to design, train, and deploy CNNs.

Designing and Training Networks

Using Deep Network Designer, you can import pretrained models or build new models from scratch.

You can also train networks directly in the app and monitor training with plots of accuracy, loss, and validation metrics.

Using Pretrained Models for Transfer Learning

Fine-tuning a pretrained network with transfer learning is typically much faster and easier than training from scratch. It requires the least amount of data and computational resources. Transfer learning uses knowledge from one type of problem to solve similar problems. You start with a pretrained network and use it to learn a new task. One advantage of transfer learning is that the pretrained network has already learned a rich set of features. For example, you can take a network trained on millions of images and retrain it for new object classification using only hundreds of images.

Hardware Acceleration with GPUs

A convolutional neural network is trained on hundreds, thousands, or even millions of images. When working with large amounts of data and complex network architectures, GPUs can significantly speed the processing time to train a model.

Deep Network Designer app for interactively building, visualizing, and editing deep learning networks.

What Is a Convolutional Neural Network? | 3 things you need to know (13)

NVIDIA® GPU, which accelerates computationally intensive tasks such as deep learning.

Related Topics

Artificial Intelligence

Predictive Maintenance

Reinforcement Learning

Machine Learning

Deep Learning

Getting Started with MATLAB

What Is a Convolutional Neural Network? | 3 things you need to know (19)

MATLAB for Deep Learning

Learn about MATLAB support for deep learning.

What Is a Convolutional Neural Network? | 3 things you need to know (20)

Tutorials and Examples

Get started with MATLAB for machine learning.

What Is a Convolutional Neural Network? | 3 things you need to know (21)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asia Pacific

Contact your local office

What Is a Convolutional Neural Network? | 3 things you need to know (2024)
Top Articles
Latest Posts
Article information

Author: Annamae Dooley

Last Updated:

Views: 6539

Rating: 4.4 / 5 (45 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Annamae Dooley

Birthday: 2001-07-26

Address: 9687 Tambra Meadow, Bradleyhaven, TN 53219

Phone: +9316045904039

Job: Future Coordinator

Hobby: Archery, Couponing, Poi, Kite flying, Knitting, Rappelling, Baseball

Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.