Skip to main content

cmd_classify

Function cmd_classify 

Source
pub fn cmd_classify(png: &Path) -> Result<()>
Expand description

Score one PNG through the k-NN classifier (crate::screen_knn: blurred unit-norm luminance + cosine vs the baked cluster centers). OOD triage in one shot — no fixture dir, no snapshot, nothing blessed. The verdict names the matched exemplar, so a miss is a viewable cause. User-supplied path, so loading is fallible (try_load_rgb_8bit) — bad input exits nonzero via anyhow, never a panic out of the fixture loader.