Computer Vision-CNN

CNN(Convolutional Neural Network)

Import a question:classification

given a feature representing for images, how do we learn a model for distinguishing features from different classes?

The machine learning framework

1:prediction function to get desired output:
f(🍎)=apple
f(🍅)=tomato
f(🐮)=cow

2:The framework
请添加图片描述
here, there are two activities:

  • Training:knowing training set {(x1,y1)……(xn,yn)} estimate the prediction function f
  • Testing:knowing f,to test x and output value y=f(x)

Neural Networks(Linear)

  • Perceptron(感知机)
  • Linear classifier-vector of weights w and a ‘bias b
    请添加图片描述
    This is convolution!

An example of binary classifying an image

  • Each pixel of the image would be an input, so, for a 28x28 image, we vectorize(矢量化),x=1x784

矢量化是一种将图像、图形或其他类型的数据转换为矢量格式的过程。在矢量格式中,图像和图形被表示为数学公式,而不是像素或其他离散数据点的集合。这种表示方式具有许多优点,包括:
可缩放性:矢量图形可以无限放大或缩小,而不会失去清晰度或产生锯齿状边缘。
编辑性:矢量图形可以轻松地编辑和修改,例如更改颜色、形状、大小等,而不会影响图像的质量。
交互性:矢量图形可以与其他应用程序进行交互,例如在网站上使用矢量图形可以使页面加载更快,并且可以通过CSS样式表轻松地更改图形属性。
打印质量:矢量图形具有更高的打印质量,因为它们不会失去清晰度或产生锯齿状边缘。
总之,矢量化可以提高图像和图形的质量,并使其更易于编辑、缩放和使用。

  • w is a vector of weights for each pixel: 784x1
  • b is a scalar(标量) bias per perceptron
  • result=xw+b ->(1x784)(784x1)+b->(1x1)+b
    [Notice: the result of multiplying xw is a scalar(dot product)]

Multuclass(add more perceptrons)

请添加图片描述

  • x same as above example ->x=1x784
  • W is a matrix of weights for each pixel/each perceptron
    w=784x10(assume 10-class classification)
  • b is a bias per perceptron(vector of biases)->b=1x10
  • result=xW+b=(1x784)x(784x10)+b=(1x10)+(1x10)=output vector

Bias convenience

  • create a ‘fake’ feature with value 1 to represent the bias
  • Add an extra weight that can vary

请添加图片描述
Then: the composition :
请添加图片描述
Outputs from one perceptron are fed into inputs of another perceptron
请添加图片描述
It’s all just matrix multiplication!

Two problems

1:with all linear functions, the composition of functions is really just a single function(not complex function)

2:Linear classifiers:small change in input can cause large change in binary output=problem for composition of functions.

The thing we want:请添加图片描述

Neural Network(Non-Linearities)

MLP(Multi-layer perceptron)

  • with enough parameters, it can approximate any function
  • images as input to neural networks(spatial correlation is local+waste of resource and we have not enough training samples)

so we import an activity: Sparse interactions

  • composition of layers will expand local to global
    before
    after
    Note:after such operation,the parameterization is good when input image is registered

Convolution Layer

请添加图片描述
请添加图片描述

pooling Layer:Receptive Field Size请添加图片描述

请添加图片描述

Pooling is similar to downsampling

  • In convolution neural network, we always adopt pooling layer after a convolution layer operation.(Often using Max pooling not average pooling)
  • There are many kind of pooling layer(max/average)
  • 请添加图片描述

Local contrast Normalization

请添加图片描述
请添加图片描述

相关推荐

  1. ImageProcessing,ComputerVision,DeepLearning中的名词

    2024-04-24 11:26:01       40 阅读
  2. basic <span style='color:red;'>CNN</span>

    basic CNN

    2024-04-24 11:26:01      28 阅读
  3. <span style='color:red;'>CNN</span>模型

    CNN模型

    2024-04-24 11:26:01      11 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-24 11:26:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-24 11:26:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-24 11:26:01       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-24 11:26:01       20 阅读

热门阅读

  1. 停车场管理系统(栈和队列的实现和应用)(cpp)

    2024-04-24 11:26:01       14 阅读
  2. 各类数据引擎指定schema或者数据库

    2024-04-24 11:26:01       14 阅读
  3. linux中新建一个超级管理员

    2024-04-24 11:26:01       15 阅读
  4. vue-json-editor

    2024-04-24 11:26:01       12 阅读
  5. map_or

    2024-04-24 11:26:01       13 阅读
  6. 如何对同一docker注册表使用多个身份验证/登录

    2024-04-24 11:26:01       14 阅读
  7. 深入Spring Boot配置机制:如何高效管理应用配置

    2024-04-24 11:26:01       14 阅读
  8. C++笔记

    C++笔记

    2024-04-24 11:26:01      12 阅读