TFIC: End-to-End Text-Focused Image Compression for Coding for Machines

Stefano Della Fiore, Alessandro Gnutti, Marco Dalai, Pierangelo Migliorati, Riccardo Leonardi

Introduction

Traditional image compression standards, such as JPEG or the newer VVC, are fundamentally designed for human consumption. They prioritize visual aesthetics by discarding high-frequency information that the human eye typically ignores. However, as autonomous systems and edge devices increasingly rely on "Coding for Machines" (ICM), this human-centric approach becomes a bottleneck. In scenarios like remote Optical Character Recognition (OCR), heavy compression often introduces artifacts that render text illegible to automated systems, even if a human might still recognize the characters.

Comparison of OCR performance across uncompressed, standard compression, and the proposed TFIC framework.

To address this, researchers have developed TFIC (Text-Focused Image Compression), a framework that prioritizes machine readability over visual fidelity. By optimizing for semantic preservation rather than pixel-wise accuracy, TFIC enables high-accuracy text extraction at extremely low bitrates that would normally cause standard OCR systems to fail.

Methodology: Learning for Machines

The TFIC framework utilizes an end-to-end learned codec based on a Transformer-inspired architecture. The core innovation lies in the training objective: instead of merely minimizing Mean Squared Error (MSE) to make the output look like the input, TFIC integrates a frozen OCR module directly into the training loop.

During training, the recognition error from the OCR engine is backpropagated through the entire compression network. This forces the encoder to identify and preserve the specific features critical for character recognition, even if the resulting reconstructed image appears "degraded" or "unnatural" to a human observer. For legacy systems using standard encoders like JPEG, the authors also developed an OCR-guided dequantization system using a Denoising Convolutional Neural Network (DnCNN) to selectively sharpen text regions, effectively recovering legibility from heavily compressed noise.

Experimental Results

The system was evaluated using both synthetic text datasets and scanned document collections. The results demonstrate a significant performance gap between machine-centric and human-centric compression.

OCR accuracy vs. bitrate (bpp) comparing TFIC against standard codecs and uncompressed baselines.

Key Findings:

  • Superior Efficiency: At an extremely low bitrate of approximately 0.008 bits per pixel (bpp), TFIC maintains nearly 95% OCR accuracy. In contrast, standard MSE-optimized codecs see performance plummet to below 60% at the same bitrate.
  • Compression as Enhancement: Remarkably, the TFIC model sometimes achieves higher accuracy than the original uncompressed images. This suggests the learned compression acts as a specialized denoising and feature-enhancement pre-processing step that simplifies the OCR task.
  • Computational Speed: The TFIC encoder is highly efficient, requiring only 12.9ms per image—roughly half the time needed for the OCR module itself (24.1ms)—making it ideal for deployment on mobile or IoT devices.

Conclusion and Future Outlook

TFIC demonstrates that for machine-to-machine communication, "pretty" pictures are often unnecessary. By focusing on the "hidden semantics" of text, TFIC achieves massive bandwidth savings without sacrificing functional accuracy. While currently specialized for text, this research paves the way for broader "semantic-aware" compression models that could preserve object categories or spatial relationships in highly constrained environments. Future work will explore joint optimization where both the codec and the machine vision module are trained together to further refine these machine-centric protocols.

Summary updated

BibTeX
@inproceedings{fiore2025tfic,
  author = {Stefano Della Fiore and Alessandro Gnutti and Marco Dalai and Pierangelo Migliorati and Riccardo Leonardi},
  title = {{TFIC: End-to-End Text-Focused Image Compression for Coding for Machines}},
  booktitle = {EUSIPCO},
  year = {2025},
}
Figure