当前位置:网站首页>CV-图像分类
CV-图像分类
2022-06-23 17:37:00 【巴川笑笑生】
什么是图像分类
核心任务
根据图像特征进行区分
给图像打标签
是更高级任务的基础
例如目标检测,图像分割
难点
语义鸿沟
- 视角
- 光照
- 尺度
- 遮挡
- 形变
- 背景杂波
- 类内形变
- 运动模糊
- 类别繁多
基于规则的方法
硬编码难以实现
数据驱动的方法

图像表示
- 全局特征
- 局部特征
如SIFT+word bag
- 像素
分类器
- SVM
- AdaBoost
- 随机森林
- 贝叶斯
- 线性分类器
- 神经网络
损失函数
- 0-1损失
- 交叉熵
- L1 L2
优化算法
- 一阶迭代
- 梯度下降
- 随机梯度下降
- 小批量随机梯度下降
- 二阶迭代
- 牛顿法
- BFGS L-BFGS
训练过程
- 数据集划分
- 数据预处理
- 数据增强
- 过拟合 欠拟合
- 超参数
- 模型集成
图像类别
- 二值图像
- 灰度图像
- 彩色图像
线性分类器
第i类线性分类器
f i ( w i , x ) = w i T x + b f_{i}(w_{i},x)=w_{i}^{T}x+b fi(wi,x)=wiTx+b
决策规则,哪个函数值最大就是哪个
权值w可以视为模板,匹配程度越高得分越高
权值也可视为超空间的分界面
损失函数
联系模型参数和模型性能指导模型优化参数
度量预测值和真实值的区别,输出通常是非负数(距离)
作为反馈信号,降低损失函数以提升模型性能
一般定义
L = 1 N ∑ i L i ( f i ( w , x i ) , y i ) L=\frac{1}{N}\sum_{i}L_{i}(f_{i}(w,x_{i}),y_{i}) L=N1i∑Li(fi(w,xi),yi)
正则项
同样一个损失函数值对应的权重不是唯一的
为了选择最优的权重w,我们需要正则项
L = 1 N ∑ i L i ( f i ( w , x i ) , y i ) + λ R ( w ) L=\frac{1}{N}\sum_{i}L_{i}(f_{i}(w,x_{i}),y_{i})+\lambda R(w) L=N1i∑Li(fi(w,xi),yi)+λR(w)
前向称为数据项,后项称为正则项
正则项防止过拟合
正则项与数据无关,只与模型有关
λ \lambda λ是超参数
超参数
学习过程前设置的参数,而不是学出来的
对模型性能影响巨大
可以使模型有偏好
L 2 L_{2} L2正则 ∑ w 2 \sum w^{2} ∑w2
惩罚大权值,鼓励权值分散
确保尽量把所有维度都用起来,而不是依赖少数特征
L 1 L_{1} L1正则 ∑ ∣ w ∣ \sum |w| ∑∣w∣
弹性正则 L 1 + β L 2 L_{1}+\beta L_{2} L1+βL2
参数优化
利用损失函数输出做反馈信号调制模型参数,提升模型性能
目标是找到使得L最优的w
梯度下降
- 方向 负梯度
- 长度 步长
算法
while True
w梯度=计算梯度(w,y,L)
w=w-w梯度*学习率
边栏推荐
- [learning notes] tidb learning notes (III)
- 研控电机步进模式
- Leetcode question brushing: hash table 03 (happy number)
- QT based graphics rendering system documentation + project source code and executable exe files + system instructions
- [sword finger offer] 46 Translate numbers into strings
- Leetcode: hash table 02 (intersection of two arrays)
- Univariate quadratic equation to gauge field
- [binary tree] flip the binary tree to match the preorder traversal
- After the Computer College changed its examination, the College of Cyberspace Security also changed its examination! Nanjing University of technology computer postgraduate entrance examination
- Latex compiled successfully but could not be output to PDF
猜你喜欢

程序员未来会成为非常内卷的职业么?

Set up your own website (13)

Redis 集群

【Unity】插件TextAnimator 新手使用说明

How to make good use of daily time to review efficiently?

"Tribute to a century old master, collect pocket book tickets"

Deep understanding of padding

Leetcode: hash table 07 (sum of three numbers)

TT 语音落地 Zadig:开源共创 Helm 接入场景,环境治理搞得定!

科技互动沙盘是凭借什么收获人气的
随机推荐
【win10 VS2019 opencv4.6 配置参考】
Leetcode question brushing: hash table 01 (valid Letter ectopic words)
科技互动沙盘是凭借什么收获人气的
【Unity】插件TextAnimator 新手使用说明
Redis 集群
An error is reported when latex uses \usepackage{hyperref}: paragraph ended before [email protected] @link was complete
Is it safe to open a stock account online in 2022?
【Qt】第十章:数据库
知道创宇:内容向善,AI+人工赋能
【Qt】选择题
Talk about row storage and column storage of database
Leetcode: hash table 04 (sum of two numbers)
How do I write a small program that can automatically edit new year greetings
【Qt】第三、四章:窗口部件、布局管理
Rancher2.6 new monitoring QuickStart
6 steps to teach you financial data mining preprocessing
3000帧动画图解MySQL为什么需要binlog、redo log和undo log
Remote connection raspberry pie in VNC Viewer Mode
对抗攻击与防御 (1):图像领域的对抗样本生成
【华中科技大学】考研初试复试资料分享