Search papers, labs, and topics across Lattice.
This paper introduces MagikaDocumentFromPixel, a lightweight image quality gate that classifies images as sharp, blurred, or uncertain, significantly enhancing the efficiency of vision-language pipelines. Through a comprehensive empirical search, the authors identify input resolution as the primary factor influencing performance, demonstrating that architecture improvements are only beneficial at resolutions of 384 pixels or higher. The proposed method achieves an impressive F1 score of 0.9803, outperforming a fixed-scale baseline by 1.31 points, while also incorporating a novel Edge Prior Module that leverages spectral evidence for improved classification accuracy.
A lightweight image quality gate can boost vision-language pipeline efficiency by accurately classifying blurry inputs, achieving an F1 score of 0.9803.
Production vision pipelines silently degrade on blurry input, wasting compute on downstream OCR, retrieval, and vision-language model (VLM) calls that cannot recover a usable output. We present MagikaDocumentFromPixel, a lightweight, CPU-friendly image quality gate that classifies a single image as sharp, blurred, or uncertain in roughly 7 ms on a single CPU core. The contributions are (i) a recipe selected from a 46-configuration, 8-sweep empirical search that isolates input resolution as the dominant lever and shows architecture capacity only pays off at >= 384 px; (ii) a confidence-aware routing formalism grounded in classical selective prediction; (iii) the Edge Prior Module (EPM), a Laplacian-magnitude auxiliary input channel that gives the network direct access to the spectral evidence that classical blur heuristics rely on and that lifts test F1 by +1.3 points in a matched-env comparison; and (iv) an observation that the gate is one instance of a recurring design pattern that appears independently in Magika content-type detection, risk-controlled OCR with VLMs, and DocVLM. The final recipe MobileNetV3-Large with the EPM trained at 384x384 on paired GoPro Large frames, evaluated with 5-scale test-time augmentation reaches F1 = 0.9803 (AUC 0.9989) with a 17 MB ONNX artifact, improving over our fixed-scale baseline on the same hardware (F1 = 0.9672) by +1.31 points. We are explicit about limitations: results are on a single motion-blur distribution, numbers are from a single seed, and calibration is qualitative rather than measured.