Low Latency Redline Detection via Vision Models
Jun 17, 2025

Summary
Introduced a low-latency redline detection system using custom vision models to identify redlined documents. This system converts PDFs to images using pyvips, trains a small, purpose-built CNN (preserving performance while meeting sub-second latency on common CPUs), and optimizes for speed and memory through sampling techniques (random sampling, RGB and edge detection filters). This enables selective application of resource-intensive span extraction processing only to documents identified as redlined, achieving zero additional latency to the user experience.