It's All About The Scale - Efficient Text Detection Using Adaptive Scaling

Elad Richardson, Yaniv Azar, Or Avioz, Niv Geron, Tomer Ronen, Zach Avraham, Stav Shapiro

Abstract

Text can appear anywhere in an image, a property that traditionally requires processing every pixel to accurately localize instances, especially small ones. Many current methods rely on enlarged or multi-scale inputs, which significantly increases processing time and redundantly processes background regions. We propose an adaptive scaling pipeline that uses a segmentation-based network with a novel "scale predictor" to estimate text location and scale on a downsampled image. This approximated prior allows us to extract only relevant text regions and pack them into a compact "knapsack" resized to a canonical scale. This knapsack is then fed back into the network for fine-grained detection. Our approach offers a powerful alternative to fixed scaling, achieving equivalent accuracy to larger input scales while processing far fewer pixels, as validated on the ICDAR15 and ICDAR17 MLT benchmarks.

The Efficiency Gap in Text Detection

In computer vision, text detection is uniquely challenging because text instances vary wildly in size and location. To detect a small sign in a high-resolution image, standard models often upscale the entire image. This approach is inherently inefficient for two reasons:

  1. Redundancy: Millions of background pixels (sky, roads, trees) are processed at high resolution despite containing no useful information.
  2. Scale Inconsistency: Upscaling can make large text harder to detect while barely making tiny text legible.

This paper introduces a system that intelligently decides which parts of an image require high-resolution analysis and at what specific magnification, breaking the "fixed-scale" trap.

Adaptive Scaling Methodology

The proposed solution is a two-stage pipeline that utilizes the same underlying neural network for both coarse and refined passes.

Stage 1: Coarse Pass and Scale Prediction

The process begins by feeding a heavily downsampled version of the image into the network. In addition to standard segmentation masks, the network includes a Scale Predictor channel. This channel predicts the height of the text at every pixel. Using height as a metric provides a more stable scale indicator than area, as it remains consistent regardless of word length. The network is trained using a log-space loss to ensure that relative errors are treated equally across different scales.

Stage 2: The Canonical Knapsack

Once the coarse pass identifies text regions and their approximate scales, the system extracts these snippets from the original high-resolution image. Each snippet is resized to a canonical scale—a uniform height optimized for the network's performance. These snippets are then efficiently packed into a single, compact image called a "knapsack" using a bin-packing algorithm.

Figure 5: Visualization of the adaptive scaling process. Original images are analyzed to extract text regions, which are then packed into a compact "knapsack" (center) at a uniform canonical scale for efficient processing.

Stage 3: Refined Detection

The compact knapsack is fed back into the network. Because the input is now composed entirely of text at an ideal size, the model can perform high-precision segmentation without the computational burden of processing the original full-scale background.

Experimental Results

The researchers evaluated the adaptive scaling approach on the ICDAR15 and ICDAR17 MLT benchmarks. The results demonstrate a superior trade-off between accuracy and computational cost.

Figure 1: Performance vs. Runtime on ICDAR15. The adaptive approach (Ours+) achieves higher F-scores at significantly lower runtimes compared to established models like PSENet and CRAFT.

On the ICDAR15 benchmark, the "Ours+" method achieved an F-score of approximately 81% while operating 2-3x faster than competitive models at similar accuracy levels. The efficiency gains are most pronounced in "sparse" images where text occupies only a small fraction of the total area. By ignoring the background during the high-resolution pass, the method achieves the accuracy of a 1440p input while processing only a fraction of the pixels.

Conclusion and Future Directions

While highly effective, the method does face limitations in extremely dense scenes (like a full page of newsprint) where there is little background to discard. Additionally, the system relies on the coarse pass to identify all regions; if a text instance is too small to be detected at the initial downsampled scale, it may be missed entirely. However, the adaptive scaling logic provides a modular efficiency boost that could potentially be integrated into other state-of-the-art detection architectures.

Summary updated

BibTeX
@inproceedings{richardson2020it,
  author = {Elad Richardson and Yaniv Azar and Or Avioz and Niv Geron and Tomer Ronen and Zach Avraham and Stav Shapiro},
  title = {{It's All About The Scale - Efficient Text Detection Using Adaptive Scaling}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=cJrS8ZMEP0},
}
Figure