文章目录
研读下面论文所作笔记:
Deep Self-Taught Learning for Handwritten Character Recognition
背景知识
特殊单词
element-wise
用矩阵乘法来说明,普通矩阵乘法叫做 “matrix multiplication”,就是线性代数里面学到的;
还有一种特殊的乘法,即为“element-wise multiplication” ,下面用例子来说明:
设 x = [1 2 3], y = [5 6 2],w = x .* y
那么w = [5 12 6]
也就是每一个元素单独相乘,“element-wise” 是在(单独)元素层面操作的意思;
structing element
仅仅由元素 0 或 1 组成;
A structuring element is a matrix consisting of only 0’s and 1’s that can have any arbitrary shape and size.
structing element
transforms 变换
Thickness
改变厚度,通过膨胀或者侵蚀操作;
创建 “structuring element” 矩阵,对于每一个像素的周围像素来说,和这个结构元素矩阵进行 “element-wise multiplication” 操作,取结果矩阵中最大或最小的结果来代替该像素;
对每一张图片而言,使用膨胀或者侵蚀操作的概率是相等的,同时从一个"structuring element"矩阵集合中选取其中最小的 n 个结构元素矩阵, n = r o u n d ( m × c o m p l e x i t y ) n = round(m \times complexity) n=round(m×complexity),当 m = 10 m = 10 m=10 时,使用膨胀操作,当 m = 6 m = 6 m=6 时,使用侵蚀操作;这样可以避免完全侵蚀掉比较细小的文字;
在这个集合里,总是存在一个原始的元素(没有经过变换的)
Slant
图片中的每一行都被等比例地移动到预定的高度上面:
s h i f i t = r o u n d ( s l a n t × h e i g h t ) shifit = round (slant \times height) shifit=round(slant×height)
s l a n t slant slant ~ U [ − c o m p l e x i t y , c o m p l e x i t y ] U[-complexity, complexity] U[−complexity,complexity]
随机选择向左或者向右移动;
Affine Transformations
仿射变换
利用参数 ( a , b , c , d , e , f ) (a, b, c, d, e, f) (a,b,c,d,e,f) 和 c o m p l e x i t y complexity complexity 确定一个大小为 2 × 3 2 \times 3 2×3的仿射变换矩阵,产生的结果像素为距离 ( a x + b y + c , d x + e y + f ) (ax + by + c, dx + ey + f) (ax+by+c,dx+ey+f) 最近的点,这样产生的效果是:缩放、平移、旋转、shearing
( a , b , c , d , f ) (a, b, c, d, f) (a,b,c,d,f)的边缘分布被用来禁止大角度的旋转(为了避免让人迷惑的类别产生),特别为了产生多样的变换:
a a a and d d d ~ U [ 1 − 3 c o m p l e x i t y , 1 + 3 c o m p l e x i t y ] U[1 - 3complexity, 1 + 3complexity] U[1−3complexity,1+3complexity]
b b b and e e e ~ U [ − 3 c o m p l e x i t y , 3 c o m p l e x i t y ] U[-3complexity, 3complexity] U[−3complexity,3complexity]
c c c and f f f ~ U [ − 4 c o m p l e x i t y , 4 c o m p l e x i t y ] U[-4complexity, 4complexity] U[−4complexity,4complexity]
-
scaling 缩放;
-
translation 平移;
-
rotation 旋转;
-
shearing
It is transformation which changes the shape of object. The sliding of layers of object occur. The shear can be in one direction or in two directions.
Local Elastic Deformations
本地的弹性变形,产生一种歪歪扭扭的效果
替换区域的强度:α ,由下列式子产生;
和 2D 高斯卷积核进行卷积运算,它的偏差如下:
Pinch
GIMP 是一个什么我还不太清楚;
以正方形图像中心 C C C 为圆心, r r r 为半径画圆,对其中任意一点 P P P,用径向上的一点 S S S的像素值代替点 P P P,满足 ∣ P S ∣ = d 2 |PS| = d_2 ∣PS∣=d2;
其中 d 1 = d i s t a n c e ( P , C ) d_1 = distance(P, C) d1=distance(P,C), d 2 = s i n ( π d 1 2 r ) − p i n c h × d 1 d_2 = sin(\frac{\pi d_1}{2r})^{-pinch}\times d_1 d2=sin(2rπd1)−pinch×d1, p i n c h pinch pinch ~ U [ − c o m p l e x i t y , 0.7 × c o m p l e x i t y ] U[-complexity, 0.7 \times complexity] U[−complexity,0.7×complexity]
noise 添加噪声
Motion Blur
Occlusion
Gaussian Smoothing
Permute Pixels
Gaussian Noise
Background Image Addition
Salt and Pepper Noise
Scratches
Grey Level and Contrast Changes
源代码
未完待续。。。