Before you spend a model call on a blurry, blown-out, or postage-stamp-sized capture, reject it at the edge. capture-qa runs fast, model-free quality gates on document/selfie images — the cheap first stage of any identity-capture pipeline.
pip install -e .from captureqa import assess
report = assess("document.jpg")
report["passed"] # overall gate
report["metrics"] # blur_score, brightness, exposure fractions, resolution
report["checks"]["sharp"] # {'passed': True/False, 'detail': 'blur_score=...'}Checks: sharpness (variance of Laplacian), over/under-exposure, and minimum resolution — all thresholds configurable. MIT licensed.