卷积神经网络

What is a Convolutional Neural Network?

3 things you need to know

卷积神经网络(CNN或Convnet)是一个网络体系结构深度学习它直接从数据中学习,从而消除了对手动功能提取的需求。

CNNs are particularly useful for finding patterns in images to recognize objects, faces, and scenes. They can also be quite effective for classifying non-image data such as audio, time series, and signal data.

要求的申请object recognition计算机视觉— such as自动驾驶车辆和面部识别应用 - 严重依赖CNN。

是什么使CNN如此有用?

Using CNNs for deep learning is popular due to three important factors:

  • CNN消除了对手动特征提取的需求 - CNN直接学习这些特征。
  • CNNs produce highly accurate recognition results.
  • CNNs can be retrained for new recognition tasks, enabling you to build on pre-existing networks.
Deep learning workflow. Images are passed to the CNN, which automatically learns features and classifies objects.

Deep learning workflow. Images are passed to the CNN, which automatically learns features and classifies objects.

CNN提供了最佳的体系结构,用于揭示和学习图像和时间序列数据中的关键特征。CNN是应用程​​序中的关键技术:

  • 医学影像:CNN可以检查成千上万的病理报告,以视觉检测图像中癌细胞的存在或不存在。
  • 音频处理: 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.
  • 停止符号检测:自动驾驶依靠CNN来准确检测符号或其他对象的存在,并根据输出做出决策。
  • Synthetic Data Generation: 使用生成对抗网络(GAN), new images can be produced for use in deep learning applications including face recognition and automated driving.

Learn More

CNN的工作方式

卷积神经网络可以具有数十个或数百个层,每个层都学会检测图像的不同特征。将过滤器应用于不同分辨率的每个训练图像,每个卷积图像的输出被用作下一层的输入。万博 尤文图斯过滤器可以以非常简单的功能(例如亮度和边缘)开始,并增加复杂性到唯一定义对象的功能。

Feature Learning, Layers, and Classification

Like other neural networks, 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.

  • 卷积将输入图像通过一组卷积过滤器放置,每个卷积过滤器都会激活图像中的某些特征。
  • 整流线性单元(relu)通过将负值映射到零并保持正值来进行更快,更有效的训练。有时被称为激活, because only the activated features are carried forward into the next layer.
  • 合并通过执行非线性下采样来简化输出,减少网络需要学习的参数数量。

These operations are repeated over tens or hundreds of layers, with each layer learning to identify different features.

具有许多卷积层的网络的示例。将过滤器应用于不同分辨率的每个训练图像,每个卷积图像的输出被用作下一层的输入。万博 尤文图斯

具有许多卷积层的网络的示例。将过滤器应用于不同分辨率的每个训练图像,每个卷积图像的输出被用作下一层的输入。万博 尤文图斯

Shared Weights and Biases

像传统神经网络,CNN具有重量和偏见的神经元。该模型在培训过程中学习了这些价值,并且通过每个新培训示例不断更新它们。但是,在CNN的情况下,给定层中所有隐藏的神经元的权重和偏置值都是相同的。

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.

分类层

After learning features in many layers, the architecture of a CNN shifts to classification.

次要层是一个完全连接的层,该层输出k维的向量,其中k是网络将能够预测的类数。该向量包含所有要分类的图像的每个类别的概率。

The final layer of the CNN architecture uses a classification layer such as softmax to provide the classification output.

使用MATLAB设计和培训CNN

UsingMATLAB®深度学习工具箱™enables you to设计,火车和部署CNN。

MATLAB提供了深度学习社区的大量预验证模型,可用于从新数据集中学习和识别功能。这种称为转移学习的方法是一种在不从头开始的情况下应用深度学习的便捷方法。诸如Googlenet,Alexnet和Inception之类的模型为探索深度学习提供了一个起点,利用了专家建造的经过验证的体系结构。

设计和培训网络

使用Deep Network Designer,您可以导入验证的型号或从头开始构建新型号。

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

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

您还可以直接在应用程序中培训网络,并使用准确性,损失和验证指标的图监视培训。

使用预审慎的模型进行转移学习

与审计网络进行微调转移学习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. These features can be applied to a wide range of other similar tasks. For example, you can take a network trained on millions of images and retrain it for new object classification using only hundreds of images.

使用GPU的硬件加速

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.

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

nvidia®GPU加速了计算密集的任务,例如深度学习。

Learn More


Applications Using CNNs

Object Detection

Object detection is the process of locating and classifying objects in images and video.计算机视觉工具箱™provides training frameworks to create deep learning-based object detectors using YOLO and Faster R-CNN.

使用深度学习的对象检测

使用深度学习的对象检测

此示例显示了如何使用深度学习和R-CNN(具有卷积神经网络的区域)训练对象探测器。

关键字检测

语音到文本的示例应用是关键字检测,它识别某些关键词或短语,并可以将其用作指令。这样的常见示例是醒来的设备并打开灯光。

使用深度学习的关键字检测

使用深度学习的关键字检测

此示例显示了如何使用MATLAB来识别和检测音频中语音命令的存在,并且可以在Voice辅助技术中使用

语义细分

CNN在语义分割中使用,用相应的类标签识别图像中的每个像素。语义细分可用于自动驾驶,工业检查,地形分类和医学成像等应用。卷积神经网络是建立语义分割网络的基础。

使用深度学习的语义细分

使用深度学习的语义细分

此示例显示了如何使用MATLAB构建语义分割网络,该网络将用相应的标签识别图像中的每个像素。

MATLAB为所有深度学习提供了工具和功能。使用CNN在信号处理,计算机视觉或通信和雷达中增加工作流程。


如何了解有关CNN的更多信息

Products that support using CNNs for image analysis includeMATLAB,计算机视觉工具箱™,Statistics and Machine Learning Toolbox™, 和深度学习工具箱.

卷积al neural networks require深度学习工具箱. Training and prediction are supported on a CUDA®具有3.0或更高计算能力的能力GPU。强烈建议使用GPU,需要Parallel Computing Toolbox™.

视频

示例以及如何

软件参考