这论文搞了个超轻量的图像模糊检测模块,7毫秒就能判断,能帮下游视觉语言模型省掉很多无用计算。实测F1到0.98,模型才17MB,值得做生产管线的看看。
论文提出MagikaDocumentFromPixel,一个轻量级CPU图像质量门,在单个CPU核上约7ms判断图像为清晰、模糊或不确定。基于46配置8扫描经验搜索,发现输入分辨率是主导杠杆。引入边缘先验模块(EPM),通过拉普拉斯幅度辅助输入使F1提升1.3点。在GoPro Large帧上以384x384训练,F1达0.9803(AUC 0.9989),ONNX模型仅17 MB。局限性包括仅针对单一运动模糊分布和单次种子结果。
Edges Before Embeddings: A Confidence-Aware Blur Gate for Vision-Language Pipelines
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.