Feature extraction using convolution

From Ufldl

Jump to: navigation, search
(Overview)
 
Line 2: Line 2:
In the previous exercises, you worked through problems which involved images that were relatively low in resolution, such as small image patches and small images of hand-written digits. In this section, we will develop methods which will allow us to scale up these methods to more realistic datasets that have larger images.
In the previous exercises, you worked through problems which involved images that were relatively low in resolution, such as small image patches and small images of hand-written digits. In this section, we will develop methods which will allow us to scale up these methods to more realistic datasets that have larger images.
-
 
-
【初译】概述
 
-
在之前的练习里,相信你练习了如何解决与低分辨率图像有关的问题,这里低分辨率图像包括如:小块的图像(存储尺寸比较小),手写数字组成的小块图像,等等。在这部分中,我们将把已知的方法扩展到实际应用中更加常见的数据集:那些更大的图像中去。
 
-
 
-
【一审】概述
 
-
前面的练习中,解决了一些有关低分辨率图像的问题,比如:小块图像,手写数字小幅图像等。在这部分中,我们将把已知的方法扩展到实际应用中更加常见的大图像数据集。
 
== Fully Connected Networks ==
== Fully Connected Networks ==
In the sparse autoencoder, one design choice that we had made was to "fully connect" all the hidden units to all the input units. On the relatively small images that we were working with (e.g., 8x8 patches for the sparse autoencoder assignment, 28x28 images for the MNIST dataset), it was computationally feasible to learn features on the entire image. However, with larger images (e.g., 96x96 images) learning features that span the entire image (fully connected networks) is very computationally expensive--you would have about <math>10^4</math> input units, and assuming you want to learn 100 features, you would have on the order of <math>10^6</math> parameters to learn. The feedforward and backpropagation computations would also be about <math>10^2</math> times slower, compared to 28x28 images.
In the sparse autoencoder, one design choice that we had made was to "fully connect" all the hidden units to all the input units. On the relatively small images that we were working with (e.g., 8x8 patches for the sparse autoencoder assignment, 28x28 images for the MNIST dataset), it was computationally feasible to learn features on the entire image. However, with larger images (e.g., 96x96 images) learning features that span the entire image (fully connected networks) is very computationally expensive--you would have about <math>10^4</math> input units, and assuming you want to learn 100 features, you would have on the order of <math>10^6</math> parameters to learn. The feedforward and backpropagation computations would also be about <math>10^2</math> times slower, compared to 28x28 images.
-
 
-
【初译】全联通网络
 
-
----
 
-
 
-
在稀疏自编码中章节中,其中一种我们谈到的设计选择是全联通网络:把所有隐含的单元跟所有的输入单元都全部连接起来。对于我们在其他章节中曾经用到过的相对较小的图像,(如在稀疏自编码的作业中用到过的8 X 8的小块图像,在MNIST数据集中用到过的28 X 28的小块图像),从计算角度而言,学习到整个图像的特征是可行的。然而,当目标是更大的图像时,(如96x96的图像),要通过这种全联通网络的这种方法来学习整幅图像上的特征,从计算角度而言,将变得非常耗时,因为此时,你要面对10的4次方(=10000)个输入单元,假设你要学习100个特征,则有10的6次方个参数需要去学习。与28x28的小块图像相比较,即使对于96x96的图像使用前向输送或者后向传导的计算方式,计算过程也会慢10的2次方(=100)倍。
 
-
 
-
【一审】全联通网络
 
-
----
 
-
 
-
在稀疏自编码章节中,我们介绍了把输入层和隐含层进行“全连接”的设计。从计算的角度来讲,在其他章节中曾经用过的相对较小的图像(如在稀疏自编码的作业中用到过的8 X 8的小块图像,在MNIST数据集中用到过的28 X 28的小块图像),从整幅图像中计算特征是可行的。但是,如果是更大的图像(如96x96的图像),要通过这种全联通网络的这种方法来学习整幅图像上的特征,从计算角度而言,将变得非常耗时。你需要设计10的4次方(=10000)个输入单元,假设你要学习100个特征,那么就有10的6次方个参数需要去学习。与28x28的小块图像相比较, 96x96的图像使用前向输送或者后向传导的计算方式,计算过程也会慢10的2次方(=100)倍。
 
== Locally Connected Networks ==
== Locally Connected Networks ==
Line 28: Line 12:
This idea of having locally connected networks also draws inspiration from how the early visual system is wired up in biology.  Specifically, neurons in the visual cortex have localized receptive fields (i.e., they respond only to stimuli in a certain location).
This idea of having locally connected networks also draws inspiration from how the early visual system is wired up in biology.  Specifically, neurons in the visual cortex have localized receptive fields (i.e., they respond only to stimuli in a certain location).
-
 
-
【初译】部分联通网络
 
-
----
 
-
 
-
解决这类问题的一种简单方法是对隐含单元和输入单元间的连接加以限制:取输入单元的一小部分子集,允许每个隐含单元都连接到这个子集,即:不连接到整个输入单元的全集。特别需要注意的是,每个隐含单元都连接到的这个子集,在输入单元中属于连续的像素区域。(输入方式区别于普通图像的是,经常可以找到一种自然而然的方式来挑选出连续群,''*译者按:即群里的元素都是连续的*'',来连接单个的隐含单元,如音频作为一种信号输入方式,一个隐含单元所需要连接的输入单元的子集,可能仅仅是一段音频输入所对应的某个时间段上的信号,''*译者按:即在时间跨度上连续的一段音频作为全部音频的子集*'')
 
-
使用部分联通网络这个想法,也曾经激发了早期的可视系统在生物学上的加速发展。特别是在视觉皮层的神经元的选择部分而不是全部的可接受程度方面(即这些神经元只响应某些特定区域的刺激)。
 
-
 
-
【一审】部分联通网络
 
-
----
 
-
 
-
解决这类问题的一种简单方法是对隐含单元和输入单元间的连接加以限制:每个隐含单元仅仅只能连接输入单元的一部分。例如,每个隐含单元仅仅连接输入图像的一小片相邻区域。(对于不同于图像输入的输入形式,也会有一些特别的连接到单隐含层的输入信号“连接区域”选择方式。如音频作为一种信号输入方式,一个隐含单元所需要连接的输入单元的子集,可能仅仅是一段音频输入所对应的某个时间段上的信号。)
 
-
网络部分连通的思想,也是受启发于生物学里面的视觉系统结构。视觉皮层的神经元就是局部接受信息的(即这些神经元只响应某些特定区域的刺激)。
 
== Convolutions ==
== Convolutions ==
Line 52: Line 24:
!-->
!-->
-
【初译】卷积
 
-
----
 
-
 
-
固有图像的一种特征是它具有固定性,也就是说,对图像的这一部分作的统计跟对图像的那一部分做的统计是完全一样的。这就意味着,我们从图像的某一部分学习到的特征能被应用到该图像的其他部分去,所以对于这个图像上的所有位置,我们都能使用同样已经学习到的特征。
 
-
 
-
【一审】卷积
 
-
----
 
-
 
-
自然图像有其固有特性,也就是说,图像的一部分的统计特性与其他部分是一样的。这也意味着我们在这一部分学习的特征也能用在另一部分上,所以对于这个图像上的所有位置,我们都能使用同样的学习特征。
 
More precisely, having learned features over small (say 8x8) patches sampled randomly from the larger image, we can then apply this learned 8x8 feature detector anywhere in the image.  Specifically, we can take the learned 8x8 features and  
More precisely, having learned features over small (say 8x8) patches sampled randomly from the larger image, we can then apply this learned 8x8 feature detector anywhere in the image.  Specifically, we can take the learned 8x8 features and  
'''convolve''' them with the larger image, thus obtaining a different feature activation value at each location in the image.   
'''convolve''' them with the larger image, thus obtaining a different feature activation value at each location in the image.   
-
【初译】
 
-
----
 
-
 
-
更恰当的解释是,当从一个大尺寸图像中随机选取一小块,比如说8x8作为样本,并且从这个小块样本中学习到了一些特征,这时我们可以把从这个8x8样本中学习到的特征作为探测器,应用到这个图像的任意地方中去。特别是,我们可以用从8x8样本中所学习到的特征跟原本的大尺寸图像作卷积,从而对这个大尺寸图像上的任一位置获得一个不同特征的激活值。
 
-
 
-
【一审】
 
-
----
 
-
 
-
更恰当的解释是,当从一个大尺寸图像中随机选取一小块,比如说8x8作为样本,并且从这个小块样本中学习到了一些特征,这时我们可以把从这个8x8样本中学习到的特征作为探测器,应用到这个图像的任意地方中去。特别是,我们可以用从8x8样本中所学习到的特征跟原本的大尺寸图像作卷积,从而对这个大尺寸图像上的任一位置获得一个不同特征的激活值。
 
To give a concrete example, suppose you have learned features on 8x8 patches sampled from a 96x96 image.  Suppose further this was done with an autoencoder that has 100 hidden units.  To get the convolved features, for every 8x8 region of the 96x96 image, that is, the 8x8 regions starting at <math>(1, 1), (1, 2), \ldots (89, 89)</math>, you would extract the 8x8 patch, and run it through your trained sparse autoencoder to get the feature activations.  This would result in 100 sets 89x89 convolved features.   
To give a concrete example, suppose you have learned features on 8x8 patches sampled from a 96x96 image.  Suppose further this was done with an autoencoder that has 100 hidden units.  To get the convolved features, for every 8x8 region of the 96x96 image, that is, the 8x8 regions starting at <math>(1, 1), (1, 2), \ldots (89, 89)</math>, you would extract the 8x8 patch, and run it through your trained sparse autoencoder to get the feature activations.  This would result in 100 sets 89x89 convolved features.   
-
【初译】
 
-
----
 
-
 
-
下面给出一个具体的例子:假设你已经从一个96x96的图像中学习到了它的一个8x8样本所具有的特征,更近一步的假设已经给100个隐含单元做好了自编码。为了得到做完卷积后的特征,对于一个96x96的图像,它的每个8x8的小块图像区域,这个区域的起始坐标可以是从(1,1),(1,2),...,一直到(89,89),你可以抽取8x8的小块区域,然后对抽取的区域逐个运行训练过的稀疏自编码来得到特征的激活值。在这个例子里,显然可以得到100个集合,每个集合含有89x89个卷积后的特征。
 
-
 
-
【一审】
 
-
----
 
-
 
-
下面给出一个具体的例子:假设你已经从一个96x96的图像中学习到了它的一个8x8的样本所具有的特征,假设这是由有100个隐含单元的自编码完成的。为了得到卷积特征,需要对96x96的图像的每个8x8的小块图像区域都进行卷积运算。也就是说,抽取8x8的小块区域,并且从起始坐标开始依次标记为(1,1),(1,2),...,一直到(89,89),然后对抽取的区域逐个运行训练过的稀疏自编码来得到特征的激活值。在这个例子里,显然可以得到100个集合,每个集合含有89x89个卷积特征。
 
<!--
<!--
Line 96: Line 41:
-
In the next section, we further describe how to "pool" these features together to get even better features for classification.
 
-
【初译】
 
-
----
 
-
在接下来的章节里,我们会更进一步描述如何把这些特征汇总到一起,得到更好的一些特征来方便对特征进行分类。
+
In the next section, we further describe how to "pool" these features together to get even better features for classification.
-
【一审】
 
-
----
 
-
在接下来的章节里,我们会更进一步描述如何把这些特征汇总到一起以得到一些更利于分类的特征。
+
{{Languages|卷积特征提取|中文}}

Latest revision as of 04:11, 8 April 2013

Personal tools