TFIC: End-to-End Text-Focused Image Compression for Coding for Machines
Stefano Della Fiore Alessandro Gnutti Marco Dalai Pierangelo Migliorati Riccardo Leonardi · 2025
Read TFIC: End-to-End Text-Focused Image Compression for Coding for Machines by Stefano Della Fiore Alessandro Gnutti Marco Dalai Pierangelo Migliorati Riccardo Leonardi (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-19495.txt.
Introduction
Stefano Della Fiore and co-authors build a squeeze method in a 2025 paper that keeps text sharp for machines, not eyes. Classic photo squeeze aims to please human sight. But many photos are read by software, above all text readers that pull words from signs and forms.
Their end-to-end build guards the traits a text reader needs, at half the cost of the reader itself. Small gear can thus squeeze on site, or send a tight file for later reading. Tests show word reads stay far truer at low file rates than with eye-first methods. Camera and form teams gain files that stay small yet read clean.
Catalog record
| CREATOR | Stefano Della Fiore Alessandro Gnutti Marco Dalai Pierangelo Migliorati Riccardo Leonardi |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 18 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-19495
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
TFIC: End-to-End Text-Focused Image Compression for Coding for Machines Thanks: This study was carried out within the Netwin project – funded by the Ministero dell’Università e della Ricerca – within the PNRR program. This manuscript reflects only the authors’ views and opinions and the Ministry cannot be considered responsible for them. Stefano Della Fiore Alessandro Gnutti Marco Dalai Pierangelo Migliorati Riccardo Leonardi Abstract Traditional image compression methods aim to faithfully reconstruct images for human perception. In contrast, Coding for Machines focuses on compressing images to preserve information relevant to a specific machine task. In this paper, we present an image compression system designed to retain text-specific features for subsequent Optical Character Recognition (OCR). Our encoding process requires half the time needed by the OCR module, making it especially suitable for devices with limited computational capacity. In scenarios where on-device OCR is computationally prohibitive, images are compressed and later processed to recover the text content. Experimental results demonstrate that our method achieves significant improvements in text extraction accuracy at low bitrates, even improving over the accuracy of OCR performed on uncompressed images, thus acting as a local pre-processing step. I Introduction For decades, image compression has been a crucial research area, driven by the increasing demand for efficient data storage and transmission across diverse digital applications. The advent of deep learning has transformed this field, driving significant interest in end-to-end learned compression frameworks, with variational autoencoder (VAE)-based methods playing a key role [ 1 , 2 ] . Unlike traditional techniques, these approaches jointly optimize the encoding and decoding stages within a unified framework. Recent works [ 3 , 4 , 5 , 6 , 7 , 8 ] have demonstrated that learned compression techniques can outperform VVC [ 9 ] , the state-of-the-art standard for image and video coding, in terms of key quality metrics such as Peak Signal-to-Noise Ratio (PSNR) and Multi-Scale Structural Similarity (MS-SSIM). These findings underscore the transformative potential of learned approaches in shaping the future of image coding [ 10 ] . Although most learned image compression methods are tailored for human perception, the growing prominence of machine vision applications has driven a shift toward task-specific optimization. Recently, image coding for machine perception has gained significant attention, fueled by the increasing need to transmit visual data efficiently for high-level recognition tasks across devices. Referred to as Image Coding for Machines (ICM), this strategy aims to refine the compression process to generate images better suited for specific downstream tasks. Some examples of tasks in this domain include denoising [ 11 ] , computer vision tasks [ 12 ] , face detection in the compressed domain [ 13 ] , and, more recently, Multimodal Large Language Models (MLLMs) [ 14 ] . Among these recognition applications, Optical Character Recognition (OCR) is a technology that enables the automatic extraction of text from images, scanned documents, and other visual data sources. OCR systems can convert printed or handwritten text into machine-readable formats. This capability is widely used across various applications, including document digitization, automated data entry, and assistive technologies for the visually impaired. Modern OCR systems often employ deep neural networks to enhance accuracy, enabling them to handle diverse fonts, handwriting styles, and challenging conditions such as poor lighting or distortions. Fig. 1: Comparison of high-level frameworks: no compression, conventional compression, and our proposed TFIC. Fig. 2: High-level architectural framework of TFIC. The main image codec is composed by an encoder g_{a} that compresses the input image into a latent representation, which is quantized and transmitted. The decoder g_{s} reconstructs the image that is subsequently processed by the OCR module for text extraction. However, a major challenge arises when applying image compression to OCR-relevant images. Compression techniques, especially at low bitrates, can introduce significant distortions, such as blurring, blocking artifacts, and loss of fine details, which can severely impact text readability. Since OCR performance heavily depends on the clarity and integrity of textual structures, excessive compression may lead to character misinterpretation or complete recognition failure. In this paper, we introduce an image compression system designed specifically for OCR-based vision tasks. Our learnt Text-Focused Image Compression (TFIC) model is built on a standard architecture commonly used for neural image compression. However, we incorporate an OCR model at the system’s output and optimize the compression process by minimizing the loss specific to OCR performance. This approach allows us to achieve a balance between efficient compression and high-quality text recognition, even at extremely lower compression rates where traditional methods strongly degrade the text to the point of being unreadable. The main contributions of this paper are the following: • We propose the first neural image compression system tailored specifically for OCR-based vision applications. • Our results demonstrate the ability to compress images at extremely low rates while enabling the OCR system to accurately extract the text. • The proposed approach offloads the entire computational complexity of the OCR system to the decoder side while preserving performance. The remainder of the paper is organized as follows. Section II provides an overview of neural image compression and OCR systems. Section III outlines the architecture of our method and its end-to-end training approach. Section IV presents experimental results and comparisons with baseline methods. Finally, Section V concludes with a summary of our findings and potential directions for future research. II Background II-A Neural image compression An end-to-end learned image compression system generally consists of two key components: the main autoencoder and the hyperprior autoencoder. The main autoencoder is composed of an analysis transform g_{a} and a synthesis transform g_{s} . The analysis transform g_{a} encodes an RGB image x\in\mathbb{R}^{H\times W\times 3} , with height H and width W , into a latent representation y\in\mathbb{R}^{\frac{H}{16}\times\frac{W}{16}\times C_{y}} using an encoding distribution q_{g_{a}}(y|x) . This latent y is then uniformly quantized as \hat{y} and entropy encoded into a bitstream via a learned prior distribution p(\hat{y}) . On the decoder side, \hat{y} is entropy decoded and reconstructed as \hat{x}\in\mathbb{R}^{H\times W\times 3} using a decoding distribution q_{g_{s}}(\hat{x}|\hat{y}) , implemented by the synthesis transform g_{s} . Throughout this process, the prior distribution p(\hat{y}) plays a critical role in determining the number of bits needed to represent the quantized latent \hat{y} . To mitigate this, a hyperprior autoencoder [ 2 ] is introduced to model the prior distribution in a content-adaptive manner. The hyperprior autoencoder consists of a hyperprior analysis transform h_{a} and a hyperprior synthesis transform h_{s} . The transform h_{a} converts the image latent y into side information z\in\mathbb{R}^{\frac{H}{64}\times\frac{W}{64}\times C_{z}} , which typically represents a small portion of the compressed bitstream. This quantized version of z is then decoded from the bitstream through h_{s} , resulting in the learned prior distribution p(\hat{y}) . II-B OCR systems An OCR system is designed to extract text from images captured in unconstrained environments. The system generally consists of four integrated modules. First, a detection module identifies and localizes regions containing text within an image, often using object detection frameworks to output bounding boxes around potential text areas [ 15 , 16 , 17 ] . Next, the transformation stage normalizes these detected regions to correct for distortions such as skew, rotation, or perspective changes. For instance, a Spatial Transformer Network (STN) with a Thin-Plate