TransTIC: Transferring Transformer-based Image Compression from Human Perception to Machine Perception

Yi-Hsin Chen, Ying-Chieh Weng, Chia-Hao Kao, Cheng Chien, Wei-Chen Chiu, Wen-Hsiao PengICCV 2023

Abstract

This work aims for transferring a Transformer-based image compression codec from human perception to machine perception without fine-tuning the codec. We propose a transferable Transformer-based image compression framework, termed TransTIC. Inspired by visual prompt tuning, TransTIC adopts an instance-specific prompt generator to inject instance-specific prompts to the encoder and task-specific prompts to the decoder. Extensive experiments show that our proposed method is capable of transferring the base codec to various machine tasks and outperforms the competing methods significantly. To our best knowledge, this work is the first attempt to utilize prompting on the low-level image compression task.

Introduction

Traditional image compression standards, such as JPEG or VVC, are optimized for human perception, prioritizing the preservation of textures and details that appeal to the human eye. However, in modern applications like autonomous driving and automated surveillance, images are primarily consumed by machine vision models. These models often require different features—such as sharp object boundaries—rather than high-fidelity textures.

While one could train specialized compression models for every vision task, the computational and deployment costs are prohibitive. TransTIC addresses this by efficiently transferring a high-quality, human-centric Transformer-based codec to various machine tasks without modifying the underlying codec parameters.

Methodology

TransTIC leverages the concept of Visual Prompt Tuning (VPT) to adapt a frozen Transformer-based image compression (TIC) model. The framework maintains a fixed Swin-Transformer-based autoencoder and introduces two types of learnable prompts:

  1. Instance-specific Prompts (Encoder): An instance-specific prompt generator (IS-PG) analyzes the input image to produce unique prompts. These are injected into the initial Swin-Transformer blocks (STB) of the encoder, guiding the feature extraction process to prioritize task-relevant information.
  2. Task-specific Prompts (Decoder): These are learnable vectors specific to a target task (e.g., object detection) injected into the decoder to assist in reconstructing features optimized for downstream AI models.
The detailed architecture of TransTIC, illustrating the injection of instance-specific prompts into the encoder and task-specific prompts into the decoder.

The system is optimized using a Rate-Distortion (RD) loss function where distortion is defined by the performance drop of the downstream machine task rather than traditional pixel-wise error.

Experimental Results

The framework was evaluated on standard benchmarks including ImageNet for classification and COCO2017 for object detection and instance segmentation. TransTIC demonstrates significant performance gains over baseline methods.

Rate-Distortion performance comparison across three machine tasks: (a) Classification, (b) Object Detection, and (c) Instance Segmentation. TransTIC consistently outperforms competing transfer methods.

Key findings include:

  • Bit-rate Efficiency: TransTIC achieved a 58.77% BD-rate saving for classification and approximately 46% for detection and segmentation compared to the base TIC model. This allows for maintaining high AI accuracy at less than half the file size.
  • Superiority over Baselines: It significantly outperformed other adaptation techniques such as Spatial Feature Transform (TIC+SFT) and channel selection.
  • Encoder Importance: Experiments confirmed that prompts at the encoder are more critical than at the decoder, as they prevent the loss of task-essential information during the initial compression phase.

Conclusion

TransTIC provides a lightweight and effective "adapter" for multi-task machine vision. By keeping the base codec frozen and using small learnable prompts, it allows for flexible deployment across various tasks with minimal storage overhead. While full fine-tuning remains the upper bound for performance, TransTIC offers a highly practical trade-off for real-world systems requiring both human and machine perception capabilities.

Summary updated

BibTeX
@inproceedings{chen2023transtic,
  author = {Yi-Hsin Chen and Ying-Chieh Weng and Chia-Hao Kao and Cheng Chien and Wei-Chen Chiu and Wen-Hsiao Peng},
  title = {{TransTIC: Transferring Transformer-based Image Compression from Human Perception to Machine Perception}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=hMTvlMUD2P},
}
Figure