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 ==
Line 29: Line 23:
While in principle one can learn feature convolutionally over the entire image, the learning procedure becomes more complicated to implement and often takes longer to execute.  
While in principle one can learn feature convolutionally over the entire image, the learning procedure becomes more complicated to implement and often takes longer to execute.  
!-->
!-->
 +
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.   
 +
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.   
 +
<!--
<!--
Line 42: Line 39:
Formally, given some large <math>r \times c</math> images <math>x_{large}</math>, we first train a sparse autoencoder on small <math>a \times b</math> patches <math>x_{small}</math> sampled from these images, learning <math>k</math> features <math>f = \sigma(W^{(1)}x_{small} + b^{(1)})</math> (where <math>\sigma</math> is the sigmoid function), given by the weights <math>W^{(1)}</math> and biases <math>b^{(1)}</math> from the visible units to the hidden units. For every <math>a \times b</math> patch <math>x_s</math> in the large image, we compute <math>f_s = \sigma(W^{(1)}x_s + b^{(1)})</math>, giving us <math>f_{convolved}</math>, a <math>k \times (r - a + 1) \times (c - b + 1)</math> array of convolved features.  
Formally, given some large <math>r \times c</math> images <math>x_{large}</math>, we first train a sparse autoencoder on small <math>a \times b</math> patches <math>x_{small}</math> sampled from these images, learning <math>k</math> features <math>f = \sigma(W^{(1)}x_{small} + b^{(1)})</math> (where <math>\sigma</math> is the sigmoid function), given by the weights <math>W^{(1)}</math> and biases <math>b^{(1)}</math> from the visible units to the hidden units. For every <math>a \times b</math> patch <math>x_s</math> in the large image, we compute <math>f_s = \sigma(W^{(1)}x_s + b^{(1)})</math>, giving us <math>f_{convolved}</math>, a <math>k \times (r - a + 1) \times (c - b + 1)</math> array of convolved features.  
 +
 +
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