arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.11837cs.CV
收藏

将 VQGAN 的码本规模扩展至 100,000,利用率达到 99%

Scaling the Codebook Size of VQGAN to 100,000 with a Utilization Rate of 99%

Peking University(北京大学);Microsoft Research Asia(微软亚洲研究院)

Lei Zhu, Fangyun Wei, Yanye Lu, Dong Chen

AI总结:

针对 VQGAN 大码本利用率低的问题,提出 VQGAN-LC,通过预训练视觉特征初始化并训练投影器对齐分布,将码本扩展至 10 万且利用率超 99%。

摘要:

在以 VQGAN 为代表的图像量化领域,该过程将图像编码为来自具有预定义规模的码本中的离散 token。近期进展,尤其是 LLAMA 3 的相关进展表明,显著扩大码本可以增强模型性能。然而,VQGAN 及其衍生方法(如 VQGAN-FC(Factorized Codes,分解码)和 VQGAN-EMA)仍在努力应对扩大码本规模和提高码本利用率方面的挑战。例如,VQGAN-FC 限于学习最大规模为 16,384 的码本,并且在 ImageNet 上通常保持低于 12% 的低利用率。在本工作中,我们提出了一种名为 VQGAN-LC(Large Codebook,大码本)的新型图像量化模型,该模型将码本规模扩展到 100,000,并实现超过 99% 的利用率。与以往优化每个码本条目的方法不同,我们的方法首先使用由预训练视觉编码器提取的 100,000 个特征来初始化码本。随后,优化集中于训练一个投影器,使 VQGAN-LC 中的整个码本与编码器的特征分布对齐。我们在多种任务上证明了本模型相对于同类模型的优越性能,包括图像重建、图像分类、使用 GPT 的自回归图像生成,以及使用基于扩散和基于流的生成模型进行图像创作。代码和模型可在 https://github.com/zh460045050/VQGAN-LC 获取。

英文摘要:

In the realm of image quantization exemplified by VQGAN, the process encodes images into discrete tokens drawn from a codebook with a predefined size. Recent advancements, particularly with LLAMA 3, reveal that enlarging the codebook significantly enhances model performance. However, VQGAN and its derivatives, such as VQGAN-FC (Factorized Codes) and VQGAN-EMA, continue to grapple with challenges related to expanding the codebook size and enhancing codebook utilization. For instance, VQGAN-FC is restricted to learning a codebook with a maximum size of 16,384, maintaining a typically low utilization rate of less than 12% on ImageNet. In this work, we propose a novel image quantization model named VQGAN-LC (Large Codebook), which extends the codebook size to 100,000, achieving an utilization rate exceeding 99%. Unlike previous methods that optimize each codebook entry, our approach begins with a codebook initialized with 100,000 features extracted by a pre-trained vision encoder. Optimization then focuses on training a projector that aligns the entire codebook with the feature distributions of the encoder in VQGAN-LC. We demonstrate the superior performance of our model over its counterparts across a variety of tasks, including image reconstruction, image classification, auto-regressive image generation using GPT, and image creation with diffusion- and flow-based generative models. Code and models are available at https://github.com/zh460045050/VQGAN-LC.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑