Preprocessing Enhanced Image Compression for Machine Vision

Guo Lu, Xingtong Ge, Tianxiong Zhong, Jing Geng, Qiang HuIEEE TCSVT 2022 · DOI

Abstract

Recently, more and more images are compressed and sent to back-end devices for machine analysis tasks (e.g., object detection) instead of being purely watched by humans. However, most traditional or learned image codecs are designed to minimize distortion for the human visual system without considering the increased demand from machine vision systems. In this work, we propose a preprocessing enhanced image compression method for machine vision tasks to address this challenge. Instead of relying on learned image codecs for end-to-end optimization, our framework is built upon traditional non-differential codecs, making it standard-compatible and easily deployable. Specifically, we propose a neural preprocessing module (NPP) before the encoder to maintain useful semantic information for downstream tasks and suppress irrelevant information for bitrate saving. Furthermore, our NPP is quantization adaptive and can be used across different compression ratios. To jointly optimize the preprocessing module with downstream tasks, we introduce a proxy network for the traditional non-differential codecs during back-propagation. Experimental results show our method achieves a better trade-off between coding bitrate and performance, saving about 20% bitrate.

Introduction

As automation scales across surveillance, autonomous driving, and IoT, the majority of captured images are now consumed by AI models rather than humans. Despite this shift, standard compression formats like JPEG and BPG remain optimized for human visual perception, often preserving textures that are redundant for machines while discarding subtle semantic cues essential for AI accuracy.

Existing "learned" codecs offer end-to-end neural optimization but face challenges in deployment due to high computational costs and lack of standardization. This research bridges the gap by introducing a Neural Preprocessing Module (NPP) that acts as a semantic filter before traditional, hardware-accelerated codecs.

Proposed Methodology

Neural Preprocessing Module (NPP)

The NPP is designed to "pre-filter" images to retain only the features essential for machine vision. It utilizes two parallel branches:

  1. Pixel-level branch: Employs 1x1 convolutions for non-linear pixel transformations.
  2. Semantic branch: Uses a U-Net style architecture to extract and preserve high-level semantic features.

By combining these outputs, the NPP generates a filtered image that is easier for traditional codecs to compress while maintaining high accuracy for downstream AI tasks.

The proposed framework contrasts traditional human-centric compression (a) with the machine-centric NPP approach (b), alongside a qualitative comparison of classification results (c).

Overcoming Non-Differentiability

A significant hurdle in training neural networks with traditional codecs is that standard encoders (like BPG) are non-differentiable, preventing standard backpropagation. The authors solve this by introducing a Proxy Network during training—a differentiable learned codec that mimics the behavior of the traditional standard. This allows gradients to flow from the machine vision loss (e.g., object detection error) back to the NPP.

Quantization Adaptation

To ensure the NPP works across various bitrates, it includes a Quantization Adaptation Layer. By taking the desired Quantization Parameter (QP) as an input, a single NPP model can dynamically adjust its filtering strategy based on the target compression level.

Experimental Results

The framework was evaluated on the COCO and ImageNet datasets using various backbones (FCOS, Faster-RCNN, ResNet, etc.).

  • Bitrate Efficiency: The method achieved a 20.3% bitrate saving for object detection on COCO and a 22.0% saving for image classification on ImageNet compared to standard BPG at equivalent accuracy levels.
  • Machine vs. Human Trade-off: Interestingly, images processed by the NPP often look "worse" to humans (higher LPIPS scores) because the module aggressively simplifies backgrounds to save bits. However, as seen in the squirrel classification example, this targeted preservation leads to higher machine accuracy at lower bitrates.
  • Computational Overhead: The NPP is highly efficient, adding only 5.17ms of latency for a 224x224 image, making it suitable for real-time applications.

Conclusion

This work demonstrates that "good for humans" and "good for machines" are distinct optimization targets in image compression. By adding a lightweight, standard-compatible neural preprocessing layer, developers can significantly reduce bandwidth requirements for AI-driven systems without sacrificing performance or abandoning existing infrastructure.

Summary updated

BibTeX
@article{lu2022preprocessing,
  author = {Guo Lu and Xingtong Ge and Tianxiong Zhong and Jing Geng and Qiang Hu},
  title = {{Preprocessing Enhanced Image Compression for Machine Vision}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2022},
  doi = {10.1109/tcsvt.2024.3441049},
}
Figure