此文由 Mix Space 同步更新至 xLog
为获得最佳浏览体验,建议访问原始链接
https://www.do1e.cn/posts/codec/AICodecIntro
数字图像处理#
电子版链接:数字图像处理(中)第三版 (1).pdf
学习第1、2、4、6.1-6.2、8章,第八章可结合JPEG 编码细节介绍 - CSDN 博客看,掌握编码的大致流程
深度学习#
首先需要对 Python 有足够的了解,可选电子书:Python 编程:从入门到实践.pdf
学习 Pytorch,B 站相关课程:跟李沐学 AI 的个人空间 - 跟李沐学 AI 个人主页 - 哔哩哔哩视频 (bilibili.com),重点看00~29.2,31,33-37,47,47.2
入门基础论文#
结合论文和代码(CompressAI)尝试自己训练一组模型,绘制 RD 曲线
常用训练、验证集:ImageNet/COCO
常用测试集:24 张 Kodak 图片,由于原始图片边缘异常,有时会使用裁剪为方形的图片
-
Ballé, J., et al. (2015). "Density modeling of images using a generalized normalization transformation." arXiv preprint arXiv:1511.06281.
AI Codec 中常用的激活层 GDN,相关代码:CompressAI/compressai/layers/gdn.py at master · InterDigitalInc/CompressAI (github.com)
-
Ballé, J., et al. (2016). "End-to-end optimized image compression." arXiv preprint arXiv:1611.01704.
介绍 AI Codec 的基础架构,可以结合 JPEG 编码看,对比它们流程中均有的变换、量化、熵编码,理解RD 损失函数。相关代码:CompressAI/compressai/models/google.py at a4ae2eeef7bdb1b84ba076ac0d650b523f3fa882 · InterDigitalInc/CompressAI · GitHub
-
Ballé, J., et al. (2018). "Variational image compression with a scale hyperprior." arXiv preprint arXiv:1802.01436.
在基础架构上添加超先验(hyper),相关代码:CompressAI/compressai/models/google.py at a4ae2eeef7bdb1b84ba076ac0d650b523f3fa882 · InterDigitalInc/CompressAI · GitHub
-
Minnen, D., et al. (2018). "Joint autoregressive and hierarchical priors for learned image compression." Advances in neural information processing systems.
自回归(autoregressive)与超先验,相关代码:CompressAI/compressai/models/google.py at a4ae2eeef7bdb1b84ba076ac0d650b523f3fa882 · InterDigitalInc/CompressAI · GitHub
注:CompressAI 在 Linux 下可直接 pip 安装,但不提供 Windows 安装包,参照下述流程安装:
- 安装 Visual Studio 中 C++ 相关包并重启
- 使用 conda 新建 python 环境并安装好 pytorch、scipy、matplotlib、pytorch-msssim
- 激活上述环境,克隆 CompressAI 至本地,终端中进入目录,
pip install .