TL;DR
This paper demonstrates that computer vision tasks like classification and segmentation can be performed directly on the latent representations of deep image compression models, bypassing the need for decoding. By doing so, the authors achieve up to a 2x reduction in computational complexity with negligible accuracy loss. Furthermore, they find that joint training of compression and vision tasks actually improves both image quality and task performance.
The Problem: Why Decode at All?
In the standard "compress-transmit-analyze" pipeline—such as a mobile device uploading a photo to a cloud service for indexing—the server must first decode the compressed bitstream back into a standard RGB image before a neural network can process it. This decoding step is computationally expensive and arguably redundant.
Modern "deep compression" methods use neural networks (autoencoders) to transform images into a compact "latent" feature space. If this latent representation already contains the essential semantic information of the image, we should be able to plug a task-specific network (like a classifier) directly into that compressed representation.
Methods: Understanding Without Decoding
The researchers leverage a convolutional autoencoder for image compression. The encoder shrinks a standard RGB image into a quantized latent representation, where the channel depth depends on the desired bitrate.
To perform tasks directly on this latent space, they introduce cResNet (compressed ResNet):
- Architecture Adaptation: Because the compressed latent is already spatially reduced (e.g., 1/8th the original size), the authors "cut off" the initial layers of a standard ResNet-50 (the root block and early convolutions) and feed the latent directly into the middle of the network.
- Joint Training: They explore training the compression encoder and the classification network simultaneously. The loss function is a weighted sum of the Rate-Distortion loss (how well the image reconstructs versus how many bits it uses) and the Task loss (classification accuracy).
- Segmentation: They similarly adapt the DeepLab architecture to work directly on these compressed features using atrous (dilated) convolutions.
Datasets
The authors evaluated their approach on two industry-standard benchmarks:
- ImageNet (ILSVRC2012): Used for image classification, consisting of 1.28 million training images across 1,000 classes.
- PASCAL VOC-2012: Used for semantic segmentation, featuring 20 object classes and a background class.
Key Insights
- The Latent Space is "Task-Ready": The internal representations learned by deep compression models are surprisingly amenable to high-level vision tasks. They function as high-level feature maps rather than scrambled data.
- Efficiency through Dimensionality: Because the latent representation is spatially smaller than the original image, the task network requires significantly fewer operations (FLOPs) to process it.
- Semantic Preservation at Low Bitrates: At very aggressive compression rates (low bits-per-pixel), decoded RGB images often become blurry or full of artifacts. Interestingly, the task networks performed better on the raw latents than on these blurry decoded images. This suggests the latents retain semantic signals that the decoder might smooth away during reconstruction.
- The Synergy Effect: Jointly training for compression and classification didn't just help the classifier; it actually improved the compression performance (yielding higher MS-SSIM scores). The network learned to prioritize preserving pixels that are semantically meaningful.
Key Results
- Speedup: Inference on compressed representations required 1.5x to 2x fewer operations compared to the standard pipeline of decoding followed by classification.
- Classification Accuracy: On ImageNet, cResNet-51 achieved 87.85% Top-5 accuracy at 0.635 bpp, which is within 0.5% of the accuracy achieved by a standard ResNet-50 operating on a fully reconstructed image.
- Segmentation Gains: For semantic segmentation at low bitrates (0.0983 bpp), the model operating on compressed latents outperformed the decoded-image baseline by 1.65% mIoU.
- Storage Savings: Using compressed representations at 0.635 bpp reduced the storage requirement for the ImageNet validation set from 144 GB (original) to 24.8 GB—a 5.8x reduction—while maintaining competitive accuracy.
Limitations and Future Work
While task inference is faster, the deep compression encoder itself is currently more computationally demanding than traditional codecs like JPEG. However, as hardware-accelerated deep learning becomes more common, this gap is expected to close. Additionally, the performance gap between latent-based inference and RGB-based inference is smallest at low bitrates; at very high bitrates, standard RGB networks still hold a slight edge. Future work could explore if these compressed latents are equally effective for more complex tasks like object detection or instance segmentation.
Summary updated