||
上采样(Upsample):在应用在计算机视觉的深度学习领域,由于输入图像通过卷积神经网络(CNN)提取特征后,输出的尺寸往往会变小,而有时我们需要将图像恢复到原来的尺寸以便进行进一步的计算(e.g.:图像的语义分割),这个采用扩大图像尺寸,实现图像由小分辨率到大分辨率的映射的操作,叫做上采样(Upsample)。
反卷积(Transposed Convolution):上采样有3种常见的方法:双线性插值(bilinear),反卷积(Transposed Convolution),反池化(Unpooling),我们这里只讨论反卷积。这里指的反卷积,也叫转置卷积,它并不是正向卷积的完全逆过程,用一句话来解释:反卷积是一种特殊的正向卷积,先按照一定的比例通过补0来扩大输入图像的尺寸,接着旋转卷积核,再进行正向卷积。
(1)主要看这篇博客,讲的很透彻形象:
轻松理解转置卷积(transposed convolution)或反卷积(deconvolution)
具体通用公式推导,看这篇博客:
https://www.cnblogs.com/shine-lee/p/11559825.html
https://zhuanlan.zhihu.com/p/48501100
(2)各种卷积动态示意图
https://github.com/vdumoulin/conv_arithmetic
N.B.: Blue maps are inputs, and cyan maps are outputs.
No padding, no strides | Arbitrary padding, no strides | Half padding, no strides | Full padding, no strides |
No padding, strides | Padding, strides | Padding, strides (odd) |
N.B.: Blue maps are inputs, and cyan maps are outputs.
No padding, no strides, transposed | Arbitrary padding, no strides, transposed | Half padding, no strides, transposed | Full padding, no strides, transposed |
No padding, strides, transposed | Padding, strides, transposed | Padding, strides, transposed (odd) |
N.B.: Blue maps are inputs, and cyan maps are outputs.
No padding, no stride, dilation |
【参考】
Dumoulin V, Visin F. A guide to convolution arithmetic for deep learning[J]. arXiv preprint arXiv:1603.07285, 2016.
点滴分享,福泽你我!Add oil!
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-1-1 09:05
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社