cnn卷积神经网络

Convolutional neural networks (CNNs) are the most popular machine leaning models for image and video analysis.

卷积神经网络(CNN)是用于图像和视频分析的最流行的机器学习模型。

示例任务 (Example Tasks)

Here are some example tasks that can be performed with a CNN:

以下是一些可以使用CNN执行的示例任务:

  • Binary Classification: given an input image from a medical scan, determine if the patient has a lung nodule (1) or not (0)二进制分类:给定来自医学扫描的输入图像,确定患者是否患有肺结节(1)(0)
  • Multilabel Classification: given an input image from a medical scan, determine if the patient has none, some, or all of the following: lung opacity, nodule, mass, atelectasis, cardiomegaly, pneumothorax多标签分类:给定来自医学扫描的输入图像,确定患者是否患有以下疾病:肺浑浊,结节,肿块,肺不张,心脏肥大,气胸

CNN如何运作 (How CNNs Work)

In a CNN, a convolutional filter slides across an image to produce a feature map (which is labeled “convolved feature” in the image below):

在CNN中,卷积滤镜会在图像上滑动以生成特征图(下图中标记为“卷积特征”):

A filter detects a pattern.

过滤器检测图案。

High values in the output feature map are produced when the filter passes over an area of the image containing the pattern.

当滤镜经过包含图案的图像区域时,将在输出要素图中产生较高的值。

Different filters detect different patterns.

不同的过滤器检测不同的模式。

The kind of pattern that a filter detects is determined by the filter’s weights, which are shown as red numbers in the animation above.

过滤器检测到的模式类型取决于过滤器的权重,权重在上方的动画中显示为红色数字。

A filter weight gets multiplied against the corresponding pixel value, and then the results of these multiplications are summed up to produce the output value that goes in the feature map.

将滤镜权重与相应的像素值相乘,然后将这些相乘的结果相加,以生成输出到特征图中的输出值。

A convolutional neural network involves applying this convolution operation many time, with many different filters.

卷积神经网络需要使用许多不同的滤波器多次应用此卷积运算。

This figure shows the first layer of a CNN:

此图显示了CNN的第一层:

Radiopedia)Radiopedia )

In the diagram above, a CT scan slice is the input to a CNN. A convolutional filter labeled “filter 1” is shown in red. This filter slides across the input CT slice to produce a feature map, shown in red as “map 1.”

在上图中,CT扫描切片是CNN的输入。 标记为“过滤器1”的卷积过滤器以红色显示。 该滤镜在输入CT切片上滑动以生成特征图,以红色显示为“图1”。

Then a different filter called “filter 2” (not explicitly shown) which detects a different pattern slides across the input CT slice to produce feature map 2, shown in purple as “map 2.”

然后,一个称为“过滤器2”(未明确显示)的不同过滤器会在输入的CT切片上滑动,以检测不同的模式,以生成特征图2,以紫色显示为“图2”。

This process is repeated for filter 3 (producing map 3 in yellow), filter 4 (producing map 4 in blue) and so on, until filter 8 (producing map 8 in red).

对滤镜3(以黄色生成图3),滤镜4(以蓝色生成图4)等重复此过程,直到滤镜8(以红色生成图8)。

This is the “first layer” of the CNN. The output of the first layer is thus a 3D chunk of numbers, consisting in this example of 8 different 2D feature maps.

这是CNN的“第一层”。 因此,第一层的输出是3D数字块,在此示例中包含8个不同的2D特征图。

Image by Author
图片作者

Next we go to the second layer of the CNN, which is shown above. We take our 3D representation (of 8 feature maps) and apply a filter called “filter a” to this. “Filter a” (in gray) is part of the second layer of the CNN. Notice that “filter a” is actually three dimensional, because it has a little 2×2 square of weights on each of the 8 different feature maps. Therefore the size of “filter a” is 8 x 2 x 2. In general, the filters in a “2D” CNN are 3D, and the filters in a “3D” CNN are 4D.

接下来,我们进入CNN的第二层,如上所示。 我们采用3D表示法(包含8个要素图),并对此应用一个称为“ filter a”的过滤器。 “过滤器a”(灰色)是CNN第二层的一部分。 请注意,“过滤器a”实际上是三维的,因为在8个不同的特征图中,每个过滤器的权重只有2×2平方。 因此,“过滤器a”的大小为8 x 2 x2。通常,“ 2D” CNN中的过滤器为3D,而“ 3D” CNN中的过滤器为4D。

We slide filter a across the representation to produce map a, shown in grey. Then, we slide filter b across to get map b, and filter c across to get map c, and so on. This completes the second layer of the CNN.

我们在表示中滑动滤镜a,以生成地图a,以灰色显示。 然后,我们将过滤器b滑到地图b上,将过滤器c滑到地图c上,依此类推。 这样就完成了CNN的第二层。

We can then continue on to a third layer, a fourth layer, etc. for however many layers of the CNN are desired. CNNs can have many layers. As an example, a ResNet-18 CNN architecture has 18 layers.

然后,我们可以继续进行到第三层,第四层等,因为需要CNN的许多层。 CNN可以有很多层。 例如,ResNet-18 CNN体系结构具有18层。

The figure below, from Krizhevsky et al., shows example filters from the early layers of a CNN. The filters early on in a CNN detect simple patterns like edges and lines going in certain directions, or simple color combinations.

下图来自Krizhevsky等人 ,显示了来自CNN早期层的示例过滤器。 CNN早期的滤镜可检测简单的图案,例如沿特定方向延伸的边缘和线条,或简单的颜色组合。

The figure below, from Siegel et al. adapted from Lee et al., shows examples of early layer filters at the bottom, intermediate layer filters in the middle, and later layer filters at the top.

下图来自Siegel等。 改编自李等人。 的示例在底部显示早期层过滤器,在中间显示中间层过滤器,在顶部显示较后层过滤器。

The early layer filters once again detect simple patterns like lines going in certain directions, while the intermediate layer filters detect more complex patterns like parts of faces, parts of cars, parts of elephants, and parts of chairs. The later layer filters detect patterns that are even more complicated, like whole faces, whole cars, etc. In this visualization each later layer filter is visualized as a weighted linear combination of the previous layer’s filters.

早期的层过滤器再次检测简单的图案,例如沿特定方向的线条,而中间层的过滤器检测更复杂的图案,例如面部,汽车部分,大象部分和椅子部分。 后面的图层过滤器检测甚至更复杂的模式,例如整张脸,整辆汽车等。在此可视化中,每个后面的图层过滤器都可视为上一层过滤器的加权线性组合。

如何学习过滤器 (How to Learn the Filters)

How do we know what feature values to use inside of each filter? We learn the feature values from the data. This is the “learning” part of “machine learning” or “deep learning.”

我们如何知道在每个过滤器内部使用哪些特征值? 我们从数据中学习特征值。 这是“机器学习”或“深度学习”的“学习”部分。

Steps:

脚步:

  1. Randomly initialize the feature values (weights). At this stage, the model produces garbage — its predictions are completely random and have nothing to do with the input.随机初始化特征值(权重)。 在此阶段,模型产生垃圾-其预测完全是随机的,与输入无关。
  2. Repeat the following steps for a bunch of training examples: (a) Feed a training example to the model (b) Calculate how wrong the model was using the loss function (c) Use the backpropagation algorithm to make tiny adjustments to the feature values (weights), so that the model will be less wrong next time. As the model becomes less and less wrong with each training example, it will ideally learn how to perform the task very well by the end of training.对一堆训练示例重复以下步骤:(a)向模型提供训练示例(b)使用损失函数计算模型的错误程度(c)使用反向传播算法对特征值进行微小调整(权重),这样下次模型就不会出错了。 随着模型在每个训练示例中的错误越来越少,理想情况下,它将在训练结束之前学习如何很好地执行任务。
  3. Evaluate model on test examples it’s never seen before. The test examples are images that were set aside and not used in training. If the model does well on the test examples, then it’s learned generalizable principles and is a useful model. If the model does badly on the test examples, then it’s memorized the training data and is a useless model.根据前所未有的测试示例评估模型。 测试示例是被搁置而未在训练中使用的图像。 如果该模型在测试示例上运行良好,那么它就可以学习通用原则,并且是有用的模型。 如果该模型在测试示例上表现不佳,则它会记住训练数据,并且是无用的模型。

The following animation created by Tamas Szilagyi shows a neural network model learning. The animation shows a feedforward neural network rather than a convolutional neural network, but the learning principle is the same. In this animation each line represents a weight. The number shown next to the line is the weight value. The weight value changes as the model learns.

由Tamas Szilagyi创建的以下动画显示了神经网络模型学习。 动画显示的是前馈神经网络,而不是卷积神经网络,但是学习原理是相同的。 在此动画中,每条线代表一个权重。 该行旁边显示的数字是重量值。 权重值随模型学习而变化。

衡量绩效:AUROC (Measuring Performance: AUROC)

Image by Author
图片作者

One popular performance metric for CNNs is the AUROC, or area under the receiver operating characteristic. This performance metric indicates whether the model can correctly rank examples. The AUROC is the probability that a randomly selected positive example has a higher predicted probability of being positive than a randomly selected negative example. An AUROC of 0.5 corresponds to a coin flip or useless model, while an AUROC of 1.0 corresponds to a perfect model.

CNN的一种流行性能指标是AUROC,即接收机工作特性下的面积。 此性能指标指示模型是否可以正确对示例进行排名。 AUROC是随机选择的阳性示例比随机选择的阴性示例具有更高的阳性预测概率的概率。 AUROC为0.5对应于硬币翻转或无用模型,而AUROC为1.0对应于理想模型。

附加阅读 (Additional Reading)

For more details about CNNs, see:

有关CNN的更多详细信息,请参阅:

  • How Computers See: Intro to Convolutional Neural Networks

    计算机的外观:卷积神经网络简介

  • The History of Convolutional Neural Networks

    卷积神经网络的历史

  • Convolution vs. Cross-Correlation

    卷积与互相关

For more details about how neural networks learn, see Introduction to Neural Networks.

有关神经网络学习方式的更多详细信息,请参见《神经网络简介》 。

Finally, for more details about AUROC, see:

最后,有关AUROC的更多详细信息,请参见:

  • Measuring Performance: AUC (AUROC)

    测量性能:AUC(AUROC)

  • The Complete Guide to AUC and Average Precision: Simulations nad Visualizations

    AUC和平均精度的完整指南:模拟和可视化

Originally published at http://glassboxmedicine.com on August 3, 2020.

最初于 2020年8月3日 发布在 http://glassboxmedicine.com 上。

翻译自: https://towardsdatascience.com/convolutional-neural-networks-cnns-in-5-minutes-dc86d0e27e1e

cnn卷积神经网络


http://www.taodudu.cc/news/show-863374.html

相关文章:

  • 基于树的模型的机器学习
  • 数据分析模型和工具_数据分析师工具包:模型
  • 图像梯度增强_使用梯度增强机在R中进行分类
  • 机器学习 文本分类 代码_无需担心机器学习-如何在少于10行代码中对文本进行分类
  • lr模型和dnn模型_建立ML或DNN模型的技巧
  • 数量和质量评价模型_数量对于语言模型可以具有自己的质量
  • mlflow_使用MLflow跟踪进行超参数调整
  • 聊天产生器
  • 深度学习领域专业词汇_深度学习时代的人文领域专业知识
  • 图像分类
  • CSDN-Markdown基本语法
  • python3(一)数字Number
  • python3(二)Numpy
  • python3(三)Matplotlib
  • python3(四)Pandas库
  • python3(六)监督学习
  • pycharm中如何调用Anoconda的库
  • TensorFlow(四)优化器函数Optimizer
  • TensorFlow(三)常用函数
  • TensorFlow(五)常用函数与基本操作
  • TensorFlow(六)with语句
  • Pycharm如何选择自动打开最近项目
  • CSDN-Markdown编辑器如何修改图像大小
  • TensorFlow(七)tf.nn库
  • TensorFlow(八)激活函数
  • TensorFlow(九)eval函数
  • TensorFlow(十)定义图变量的方法
  • TensorFlow读取MNIST数据集错误的问题
  • Tensorflow(一) 基础命令
  • TensorFlow(二)函数基础

cnn卷积神经网络_5分钟内卷积神经网络(CNN)相关推荐

  1. python记录日志_5分钟内解释日志记录—使用Python演练

    python记录日志 Making your code production-ready is not an easy task. There are so many things to consid ...

  2. html5 学习_5分钟内学习HTML

    html5 学习 by Eric Tirado 埃里克·蒂拉多(Eric Tirado) 5分钟内学习HTML (Learn HTML in 5 minutes) 快速教程可帮助您开始构建网站. (A ...

  3. 初学者css常见问题_5分钟内学习CSS Grid-初学者教程

    初学者css常见问题 Grid layouts are fundamental to the design of websites, and the CSS Grid module is the mo ...

  4. css flexbox模型_5分钟内学习CSS Flexbox-初学者教程

    css flexbox模型 快速介绍流行的布局模块 (A quick introduction to the popular layout module) In this post, you'll l ...

  5. 初学者css常见问题_5分钟内学习CSS-初学者教程

    初学者css常见问题 关于网络设计语言的快速教程. (A quick tutorial on the design language of the web.) CSS (Cascading Style ...

  6. 比特币怎么比特币钱包_5分钟内获得比特币

    比特币怎么比特币钱包 Blockstream的埃里克·马丁开了五分钟的所有开放闪电倾诉着一个大胆的说法:"比特币是一个关于我们这个时代最显著的创新." 为什么? 因为这取决于信任 ...

  7. Deep Learning模型之:CNN卷积神经网络(一)深度解析CNN

    本文整理了网上几位大牛的博客,详细地讲解了CNN的基础结构与核心思想,欢迎交流. [1]Deep learning简介 [2]Deep Learning训练过程 [3]Deep Learning模型之 ...

  8. [转]Deep Learning模型之:CNN卷积神经网络(一)深度解析CNN

    Deep Learning模型之:CNN卷积神经网络(一)深度解析CNN 原文地址:http://m.blog.csdn.net/blog/wu010555688/24487301 本文整理了网上几位 ...

  9. 基于卷积神经网络CNN的水果分类预测,卷积神经网络水果等级识别

    目录 背影 卷积神经网络CNN的原理 卷积神经网络CNN的定义 卷积神经网络CNN的神经元 卷积神经网络CNN的激活函数 卷积神经网络CNN的传递函数 卷积神经网络CNN水果分类预测 基本结构 主要参 ...

最新文章

  1. shell test命令
  2. 《强化学习周刊》第11期:强化学习应用之模拟到真实
  3. socket 编程入门教程(一)TCP server 端:5、创建监听嵌套字
  4. 专访Google数据科学家彭晨:大数据成为潮流走近各行各业!
  5. 5月16日上午学习日志
  6. runtime java_Java runtime.getruntime()从执行命令行程序获得输出
  7. sql取整数_SQL 窗口函数
  8. python - class类 (七) 三大特性 - 封装 结尾
  9. macbook运行移动硬盘中windows及bootcamp下载出错问题的解决
  10. 二次方程c语言计算器,解方程计算器
  11. 迅雷下gho文件变成php,GHO格式文件转换成WIM格式文件
  12. Warshall算法求传递闭包
  13. stm32 simulink 快速计算 Timmer定时器需要的预分频PSC和自动重载ARR
  14. 黑马程序员_计算机编码技术
  15. “瓮中捉鳖”——涨停板一般出现在什么时候?
  16. GPT-2 论文翻译
  17. STM32定时器延时函数
  18. 基于STM32单片机与wifi模块串口结合进行PC端或手机端无线通信(附项目资料包)
  19. c语言的各种规范:C89、C90、C95、C99
  20. 高精度组合导航里的松、紧、深耦合

热门文章

  1. 63.2. 配置 Postfix
  2. shp与json互转(转载)
  3. HTML中显示的文字自动换行
  4. RESTLET开发实例(三)基于spring的REST服务
  5. [Android]发布Sqlite数据库
  6. linux 多域名绑定
  7. javascript:window.showModalDialog缓存问题
  8. 宝塔安装 pdo_mysql_linux宝塔面板安装安装 pdo_sqlsrv扩展
  9. java13种技术_JavaEE的13种核心技术
  10. preparing automatic repair怎么解决_单一窗口插卡登录频繁提示安装IC卡控件的终极解决办法...