Spaces:
Running
Running
| title: Flask Finger Quality API | |
| sdk: docker | |
| app_port: 7860 | |
| Here is how to read each score and why some “good-looking” images still fail overall. | |
| *** | |
| ## 1. What each score means | |
| These ranges are based on the thresholds used in the code you ran (blur_min=80, illum_min=60, illum_max=200, coverage_min=0.10, orientation_max_deviation=30, vertical_expected=True). | |
| ### Blur score (variance of Laplacian) | |
| - Metric: “How sharp is the finger texture?” Higher is better. | |
| - Rough scale (with current threshold 80): | |
| - 0–30 → Very blurry (fail). | |
| - 30–60 → Soft / borderline sharpness (often fail, might be visually OK). | |
| - 80–200 → Good sharpness for most mobile cases (pass). | |
| - 200+ → Very sharp (pass). | |
| ### Illumination score (mean grayscale in ROI) | |
| - Metric: “Average brightness of the finger region.” | |
| - Thresholds now: 60 ≤ illumination ≤ 200. | |
| - Rough interpretation: | |
| - < 50 → Too dark / underexposed (fail). | |
| - 50–200 → Acceptable brightness (pass). | |
| - > 200 → Too bright / overexposed (fail). | |
| ### Coverage ratio | |
| - Metric: “Fraction of the full frame covered by segmented finger pixels.” | |
| - Threshold now: coverage ≥ 0.10 (10% of frame). | |
| - Rough interpretation: | |
| - < 0.10 → Finger too small, far away, or segmentation bad (fail). | |
| - 0.10–0.20 → Minimum acceptable; finger is present but not very large. | |
| - ≥ 0.20–0.40 → Good coverage for biometric capture (pass). | |
| ### Orientation angle | |
| - Metric: PCA angle of the main axis of the finger ROI, in degrees relative to x‑axis, normalized to about −90° to 90°. | |
| - With `vertical_expected=True`, the code expects the finger to be **vertical** (angle near ±90°). | |
| - Threshold now: within 30° of the expected orientation. | |
| - If vertical expected: | |
| - Angles near +90° or −90° → good. | |
| - Big deviation from vertical → fail. Deviation allowed - 45° | |
| - If horizontal finger is desired, you would set `vertical_expected=False` to expect angles near 0°. | |
| *** | |