Image classification is the base of computer vision.
The main problem we meet is the semantic gap between pictures and pixels.
Moreover, there are so many variables such as brightness, deformation and background etc.
So what we should do is to build an image classifier robust to all changes.
Method - Data-driven approach - Machine Learning ( Dataset, Training, Test & Evaluation)
First classifier - Naive distance comparison
直接遍历训练集,比较测试图片与训练图片的像素差,最贴近的即为答案。
但这种方法也会有很多变数。如何定义距离? distance metric
- Manhattan : 对绝对值差求和
- Euclidean : 欧式距离
关于选择哪个模型,这就是超参数(hyperparameter)。组会时也听到过。
事实上,这种方法 is never used. 因为它关于训练集是linear time,太慢了。我们要real-time test,通过 long-time training.
CNN入门 - Linear Classification
CNN负责CV,RNN负责NLP,结合完成机器对视觉图像的语义解读。
parametric approach 参数化方法
x为图像(我们把Pixel矩阵拉直成列向量),W为权重矩阵(调参的,足足30720个参数!),b为bias参数列向量。
最后得到的f(x,W)是个10维列向量,分别是对每个类别的打分(基于每个独立的分类器(W的行向量)对x的加权和)。
(理解上述简单的话,线性代数知识)
例子与高维空间的几何解释
本讲结束。下讲是Loss function,对分类器好坏的评判。