Hi everyone! I’m a contributor to hmg-physical-quality-decision-ai, sharing this in a personal capacity.
The project detects objects as oriented bounding boxes and classifies them as GOOD or BAD, with weld inspection as the first use case. It includes a CLI, API, and web UI.
The interesting part is the decision pipeline: it aggregates predictions across test-time augmentations, uses prediction entropy to decide when to consult a reference embedding bank, and applies kNN voting to refine uncertain predictions.
It’s a prototype, and I’d love feedback on the evaluation:
• How would you compare classifier-only, always-on kNN, and entropy-gated kNN on the same detected crops?
• How would you measure rare-defect recall while separating detection misses from classification errors?
Code and examples:
If you work on industrial vision or retrieval-based classification, what would you test first?
The clean comparison is on frozen crops: run classifier-only, always-on kNN, and entropy-gated kNN on exactly the same detected crops, and add a fourth run on ground-truth crops — that last run caps what classification can recover, so a defect the detector never produced counts only as a detection miss and end-to-end rare-defect recall splits cleanly into detection recall × recall given detection. Then judge the gate by its curve rather than one threshold: sweep the entropy cutoff, plot rare-defect recall against the share of crops routed to kNN, and build the reference bank split by weld or part, never by crop, so no near-duplicate of a test crop can leak in — the gate earns its place only if it reaches always-on recall while routing far fewer crops, and you will see it directly in that plot.