Learned Image Coding for Machines: A Content-Adaptive Approach

Nam Le, Honglei Zhang, Francesco Cricri, Ramin Ghaznavi-Youvalari, Hamed Rezazadegan Tavakoli, Esa RahtuarXiv 2021 · DOI

TL;DR

This paper introduces a content-adaptive fine-tuning scheme for Image Coding for Machines (ICM). By optimizing the latent representation of an image at inference time using a proxy perceptual loss, the authors significantly improve compression efficiency for machine tasks like instance segmentation, achieving a 30.54% bitrate saving over the state-of-the-art VVC standard.

What Problem Does This Paper Address?

Traditional image compression (like JPEG or HEVC) is designed to make images look good to the human eye, typically by minimizing Mean Squared Error (MSE). However, the fastest-growing category of internet traffic is machine-to-machine (M2M) communication, where the "consumer" is an AI model performing tasks like object detection or segmentation.

Neural network (NN)-based codecs are promising for these use cases because they can be trained end-to-end. However, they often suffer from domain shift: a model trained on one dataset may perform poorly on real-world test data with a different distribution. Furthermore, at the encoder side, we usually don't have access to the specific task network (the "machine") or the ground-truth labels needed to optimize the bitstream for a specific image on-the-fly.

Methods

The authors propose an inference-time optimization strategy that adapts the compressed data to the specific input content without changing the decoder's parameters.

  1. Baseline ICM System: They start with an end-to-end learned codec consisting of an autoencoder and a probability model for entropy coding. The system is initially trained to balance bitrate, reconstruction accuracy (MSE), and task performance (using a Mask R-CNN task loss). System architecture of the baseline ICM system
Fig. 1. System architecture of the baseline Image Coding for Machines system. “EE” and “ED” denote arithmetic entropy encoder and decoder, respectively.
  1. Online Latent Tensor Fine-tuning: At the inference stage, the encoder doesn't just pass the image through the network once. Instead, it iteratively updates the latent representation ($y$) to minimize a specific fine-tuning loss. Because the actual task network and ground truth are unavailable at the encoder, they use a proxy loss: a feature-based perceptual loss calculated using a pre-trained VGG-16 model. The online latent tensor fine-tuning pipeline
Fig. 3. Online latent tensor finetuning pipeline
  1. The "Aha" Moment: By back-propagating gradients from this proxy loss through the frozen decoder, the encoder "overfits" the latent representation to preserve the specific features most useful for vision tasks, effectively alleviating the domain shift problem.

Datasets

The study utilizes the Cityscapes dataset, which contains high-resolution (2048 x 1024) uncompressed images of urban street scenes.

  • Training: 2,975 images.
  • Evaluation: 500 images from the validation set.
  • Task: Instance segmentation for classes including cars, persons, bicycles, buses, trucks, trains, and motorcycles.

Key Insights and Ideas

  • Proxy Tasks Work: You don't need the actual "machine" (task network) at the encoder to optimize for it. A generic feature extractor like VGG-16 provides enough signal to preserve the structural information (edges and surfaces) that specialized models like Mask R-CNN need.
  • Low-Bitrate Sensitivity: The method is most effective at low bitrates. In these regimes, standard compression often "washes out" subtle features. Fine-tuning forces the codec to prioritize the specific structures of the input image that matter for the task.
  • No Decoder Overhead: Because only the latent representation is modified—and not the network weights—the decoder remains standard and doesn't need any extra information or updates to process the optimized bitstream.

Key Results

The researchers compared their method against their own baseline and the Versatile Video Coding (VVC) standard using the Bjøntegaard Delta (BD)-rate metric (where lower is better).

  • Vs. Baseline: The fine-tuning provided an average bitrate saving of -3.66%, jumping to -9.85% at low bitrates (< 0.05 BPP).
  • Vs. VVC: The combined system (pretrained + fine-tuned) achieved a massive -30.54% BD-rate improvement over VVC for instance segmentation.
  • Qualitative Impact: Visualizing the changes shows that fine-tuning specifically modifies the areas around the edges and surfaces of objects, which are critical for accurate segmentation. Rate-performance curves showing the "Proposed" method outperforming the baseline and VVC
Fig. 5. Rate-performance curves on low bitrates. The small dashed lines connect the baseline checkpoints and their re- spective finetuned versions.

Limitations and Future Work

The primary limitation is computational complexity. The fine-tuning process requires 30 iterations per image, taking approximately 14 seconds on an NVIDIA RTX 2080Ti. While acceptable for some offline applications, this is currently too slow for real-time video or high-throughput edge devices.

The authors suggest that future work could explore different configurations to magnify these gains across a wider range of bitrates and verify the effectiveness of this technique on other computer vision tasks beyond instance segmentation.

Summary updated

BibTeX
@misc{le2021learned,
  author = {Nam Le and Honglei Zhang and Francesco Cricri and Ramin Ghaznavi-Youvalari and Hamed Rezazadegan Tavakoli and Esa Rahtu},
  title = {{Learned Image Coding for Machines: A Content-Adaptive Approach}},
  year = {2021},
  eprint = {2108.09992},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.09992},
}
Figure