feat: improve food scanning UX for low-confidence and non-food images#148
Merged
Indecisive613 merged 1 commit intomainfrom Mar 16, 2026
Merged
feat: improve food scanning UX for low-confidence and non-food images#148Indecisive613 merged 1 commit intomainfrom
Indecisive613 merged 1 commit intomainfrom
Conversation
- Add backend threshold for low confidence scores - Show a no food detected banner and ask user to try again
Indecisive613
approved these changes
Mar 16, 2026
Collaborator
Indecisive613
left a comment
There was a problem hiding this comment.
Looks good. It doesn't rule out all edge cases - that would require an entirely new model, but at least we can rule out some very low confidence classifications!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Note: There will still be edge cases where the current model mistakes non-food items as food with high confidence. The purpose of this PR is to filter out all the low confidence scores.
Fixes #110
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Scan an obviously non‑food photo (e.g. object or person) and verify:
- The backend returns
success: false,reason: "low_confidence", and a message.- The scan screen shows the red “No food detected” banner and does NOT show a food details table or warnings.
The idea is anything
Checklist