CNN的学习笔记

used area:images recognition, images classifications. Objects detections, recognition faces etc.

CNN to train and test, each input image will pass through a series of convolution layers with filters (Kernals), Pooling, fully connected layers (FC) and apply Softmax function to classify an object with probabilistic values between 0 and 1. The below figure is a complete flow of CNN to process an input image and classifies the objects based on values.



CNN image classifications takes an input image, process it and classify it under certain categories (Eg., Dog, Cat, Tiger, Lion). Computers sees an input image as array of pixels and it depends on the image resolution. 

Components:

1. Convolution Layer

Convolution is the first layer to extract features from an input image. It is a mathematical operation that takes two inputs such as image matrix and a filter or kernal.

2. Strides

Stride is the number of pixels shifts over the input matrix. 

3. Padding

Sometimes filter does not fit perfectly fit the input image. We have two options:

  • Pad the picture with zeros (zero-padding) so that it fits
  • Drop the part of the image where the filter did not fit. This is called valid padding which keeps only valid part of the image.

4. ReLU

ReLU stands for Rectified Linear Unit for a non-linear operation. 

5. Pooling Layer

Pooling layers section would reduce the number of parameters when the images are too large. Spatial pooling also called subsampling or downsampling which reduces the dimensionality of each map but retains the important information. Spatial pooling can be of different types:

  • Max Pooling
  • Average Pooling
  • Sum Pooling

6. Fully connected layer

we flattened our matrix into vector and feed it into a fully connected layer like neural network. 

Feature map matrix will be converted as vector (x1, x2, x3, …). With the fully connected layers, we combined these features together to create a model. Finally, we have an activation function such as softmax or sigmoid to classify the outputs as cat, dog, car, truck etc.,


这篇笔记基本摘抄 https://medium.com/@RaghavPrabhu/understanding-of-convolutional-neural-network-cnn-deep-learning-99760835f148 觉得写的很好

另外推荐 李宏毅老师的ML的视频 Lecture10 讲CNN的 讲的很好!




猜你喜欢

转载自blog.csdn.net/weixin_39915444/article/details/80710414