Exploring Effective Mask Sampling Modeling for Neural Image Compression

Lin Liu, Mingming Zhao, Shanxin Yuan, Wenlong Lyu, Wengang Zhou, Houqiang Li, Yanfeng Wang, Qi TianarXiv 2023 · DOI

Abstract

Neural image compression (NIC) has traditionally focused on spatial redundancy, often overlooking the significant correlations between feature channels. This paper proposes a novel "Cube Mask Sampling" strategy to address both spatial and channel redundancies. By randomly masking elements across three dimensions during pre-training and utilizing learnable modules to prune redundant channels, the proposed method achieves state-of-the-art performance. Experimental results on standard datasets demonstrate that our approach significantly reduces computational complexity and bit-rate while maintaining high reconstruction quality, outperforming existing CNN and Transformer-based backbones.

Introduction

Traditional and neural image compression (NIC) aim to eliminate data redundancy to represent images efficiently. While most NIC research focuses heavily on spatial redundancy—using hyperpriors and context models to predict pixels from their neighbors—channel redundancy is often neglected. Channel redundancy refers to the correlation between different feature maps in a deep network. Existing methods that address this often rely on complex architectures or pruning techniques designed for high-level vision tasks, which do not always translate well to the pixel-perfect requirements of image reconstruction.

This paper introduces a lightweight, "plug-and-play" mechanism called Cube Mask Sampling. This strategy identifies and removes redundant information across all dimensions (height, width, and channels) without sacrificing image quality, achieving state-of-the-art compression performance with significantly lower computational complexity than previous methods.

Proposed Methodology

The authors propose a two-stage training pipeline consisting of Pre-training and Finetuning, featuring three core modules integrated into an entropy-based compression framework.

Overview of the proposed architecture and the two-stage training pipeline (Pretraining and Finetuning).

Core Modules

  1. Cube Mask Sampling Module (CMSM): Employed during pre-training, this module randomly sets elements of the feature map to zero. Unlike standard Masked Autoencoders (MAE) that mask spatial patches, CMSM masks a "cube" across spatial ($H \times W$) and channel ($C$) dimensions. This forces the network to learn how to recover missing information by leveraging both neighboring pixels and correlated channels.
  2. Learnable Channel Mask Module (LCMM): This module uses a learnable probability vector to identify critical channels. It prunes redundant channels, passing only a subset to the entropy model, which directly reduces the bit rate and computational load.
  3. Learnable Channel Completion Module (LCCM): Positioned before the decoder, this module re-inserts "mask tokens" into the positions of the dropped channels, allowing the decoder to reconstruct the full feature set.

Experimental Results

The models were trained on the ImageNet-Val dataset and evaluated on the Kodak and Tecnick industry-standard datasets. The proposed method was tested using both CNN-based (GDN) and Transformer-based (Uformer) backbones.

Performance comparison of the proposed method against SOTA models in terms of PSNR and computational complexity (MACs/pixel).

Key Findings

  • Superior Efficiency: The Ours_Uformer model achieved a -6.32% BD-Rate reduction relative to the VVC (VTM 16.2) standard. It is particularly effective at low bit rates, achieving up to 14% rate savings at approximately 28dB PSNR on the Kodak dataset.
  • Lower Complexity: Compared to other state-of-the-art (SOTA) models, the proposed method is remarkably lean. For example, it uses 31.7M parameters and 16.6B FLOPs for a $256 \times 256$ input, significantly less than models like Minnen20 (116M parameters) or InvCompress (68B FLOPs).
  • Coding Speed: The total coding time (encoding + decoding) was measured at 59ms on an NVIDIA 3090Ti, outperforming other efficient models like Entroformer (75ms).

Conclusion

This work demonstrates that "Cube Masking" is superior to purely spatial or channel-wise masking for compression tasks. By disrupting both dimensions simultaneously, the model develops a deeper understanding of underlying data structures. While the two-stage training process adds some overhead, the resulting gains in efficiency and performance make it a compelling strategy for next-generation neural image compression. Future work may extend these modules to other low-level vision tasks such as denoising or super-resolution.

Summary updated

BibTeX
@misc{liu2023exploring,
  author = {Lin Liu and Mingming Zhao and Shanxin Yuan and Wenlong Lyu and Wengang Zhou and Houqiang Li and Yanfeng Wang and Qi Tian},
  title = {{Exploring Effective Mask Sampling Modeling for Neural Image Compression}},
  year = {2023},
  eprint = {2306.05704},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.05704},
}
Figure