这个论文引入 VQGAN 的思想进行图像修复。作者认为,现有的夜间图像恢复方法效果不好是因为缺乏稳定和可靠的先验知识。为了解决这个问题,论文引入了向量量化(VQ)代码簿作为一个可靠和高质量的外部特征库,为纯数据驱动的图像恢复提供高质量先验。 同时,做了两个改进,提出了自适应光照增强模块(AIEM)和可变形双向交叉注意力(DBCA)模块来确
学习 codebook 的部分与 VQ-VAE 大同小异,不同之处在于:加了一个 Patch Discriminator 做对抗训练,以及把重构损失的 L2 loss 换成了 perceptual loss. 实验证明 VQ-VAE 的重构非常模糊,而 VQGAN 能保留很多细节。为了实现无条件生成, VQ-VAE 使用 PixelCNN 学习 latent prior,能力比较弱,而 VQGAN 采用了 ...
Once the codebook size is fixed, then the mean square error (MSE) reaches a value, beyond which it cannot be reduced by using codebook generation algorithms. In this paper, we are proposing modified genetic algorithm giving the optimal value, but it depends on the initial selection of the ...
表3可看出比起VQGAN,在不使用Gumbel-Softmax和multi-scale hierarchical codebook的情况下,通过加大codebook大小ViT-VQGAN可取得更好的FID 表4 ViT-VQGAN的消融实验。codebook usage计算的是整个测试集上以256为1个batch的code平均使用百分比 后面几行都是跟第一行对比,可以看出基于StyleGAN的判别器就是比PatchGAN好...
Last commit message Last commit date Latest commit History 8 Commits Figures models utils README.md inference_vqlol.py test_metric.py README This is the office implementation ofVQCNIR: Clearer Night Image Restoration with Vector-Quantized Codebook, AAAI2024. ...
Varying Codebook Size and Dimensionality.见表4,当两项都设置为512时,VQ-I2I只用了35个code左右,而两项都缩减到64则codebook利用率达到100%,但表中指标都十分接近。(毕竟一个模型需要处理一种转换任务?) Conclusion 强调用了向量量化这个“新”,性能不足但是功能多 ...
向量量化是一种数据压缩技术,它将连续的向量数据映射到离散的向量空间中。这种技术通过预先定义一个码本(Codebook),码本中的每个向量代表一个离散的表示。输入向量通过与码本中的向量进行比较,找到最近的向量作为量化后的结果。 公式化描述: 码本:Z = {z_k}_{k=1}^{K},其中z_k是码本中的第k个向量。 输...
codebook可以看作是编码器和解码器共享的一组可学习的离散概念,以便描述给定图像的内容。VQ-VAE需要找到使这组离散概念尽可能具有信息性的方法,以便编码器可以用对解码器有意义的特定码向量准确地标记每个网格正方形。因此,VQ-VAE的损失函数需要在重构损失加上以下两项:对齐损失 (alignment loss) 和承诺损失 (commitme...
such as FactorVAE [6], which operates in a continuous latent space and is prone to posterior collapse [9], or recurrent architectures [10] that emphasize temporal dependencies, but often fail to disentangle latent factors, FactorVQVAE maps continuous embeddings to a finite set of codebook vecto...
Codebook Training Pre-train VQ codebook on FFHQ datasets. python -m torch.distributed.launch --nproc_per_node=8 --master_port=2022 vqfr/train.py -opt options/train/VQGAN/train_vqgan_v1_B16_800K.yml --launcher pytorch Or download our pretrainedVQ codebookGoogle Driveand put them in theex...