Deep Learning

Deep learning with MATLAB

Deep learning is a branch of machine learning that uses multiple nonlinear processing layers to learn useful representations of features directly from data. Deep learning models can achieve state-of-the-art accuracy in object classification, sometimes exceeding human-level performance. Models are trained by using a large set of labeled data and neural network architectures that contain many layers.

Deep learning can be applied to a variety of problems including:

  • Image classification
  • Speech recognition
  • Natural language processing
Explore deep learning fundamentals in this MATLAB® Tech Talk. You’ll learn why deep learning has become so popular, and you’ll walk through 3 concepts: what deep learning is, how it is used in the real world, and how you can get started.
Learn about the differences between deep learning and machine learning in this MATLAB® Tech Talk. Walk through several examples, and learn about how decide which method to use.

Training a Deep Learning Model

The accuracy of a deep leaning model largely depends on the amount of data used to train the model.  The most accurate models may require thousands or even millions of samples, which can take a very long time to train. Once a deep learning model is trained, it can be used in real-time applications, such as pedestrian detection in advanced driver assistance systems (ADAS).

Image Classification Using Convolutional Neural Networks

A convolutional neural network, or CNN, is a popular deep learning architecture. Neural networks are organized in layers consisting of a set of interconnected nodes. A CNN convolves learned features with input data, and uses 2D convolutional layers that makes this architecture well suited to processing 2D data, such as images.

Data processing flow through a CNN trained to perform an image classification task. 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 move to more complex shapes as the layers progress.

Explore the basics of convolutional neural networks (also called CNNs or ConvNets) in this MATLAB® Tech Talk. You’ll learn 3 concepts: local receptive fields, shared weights & biases, and activation & pooling. You’ll also learn 3 ways to train CNNs.

Transfer Learning

A tremendous amount of data is required to train a CNN because it has to learn millions of weights for a typical image classification problem. A common alternative to training a CNN from scratch is to use a pretrained model to extract features from a new data set automatically. This method, referred to as transfer learning, is a convenient way of applying deep learning without the need for a huge data set and very long training time.

A comparison of the complexity and accuracy of creating a CNN from scratch vs. using a pretrained model.

Learn how to use transfer learning in MATLAB to re-train deep learning networks created by experts for your own data or task.

Hardware Acceleration with GPUs

Training a deep learning model can take a long time, from days to weeks. Using GPU acceleration can speed up the process significantly. Using a GPU reduces the time required to train a network and can cut the training time for an image classification problem from days down to hours.

Neural Network Toolbox commands for training your own CNN from scratch or using a pretrained model for transfer learning.

For more information on training and using deep learning models, see MATLAB®, Computer Vision System Toolbox™, Statistics and Machine Learning Toolbox™, and Neural Network Toolbox™.

Software Reference

See also: machine learning, object detection, object recognition, feature extraction, image recognition, pattern recognition, research with MATLAB

Deep Learning with MATLAB