-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New Feature: Food Search 2.0 for Loop! #2329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
taylorpatterson-T1D
wants to merge
10
commits into
LoopKit:dev
Choose a base branch
from
taylorpatterson-T1D:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+15,828
−1,442
Conversation
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
A new AI-enabled food search capability for Loop. Loop has helped me become a better diabetic and I would love to give back to the community by contributing this new feature for Loop, which I believe will benefit all Loop users. PROBLEM WE'RE SOLVING: Diabetics often lack nutrition knowledge when estimating carb intake. And we need that knowledge when we’re making dosing decisions - this knowledge is the single most important tool we have to improve our Time in Range and A1C. Loop's Food Search feature uses barcodes and AI analysis to provide accurate nutrition information and advanced diabetes management recommendations. NEW FEATURE'S IMPACT: The Food Search system is a comprehensive food analysis and nutrition tracking solution integrated into Loop for improved diabetes management. It provides multiple search options including text, barcode scanning, voice, and AI-powered image analysis that produces comprehensive nutrition data and dosing suggestions via diabetic notes. This let's us enter a meal bolus with MUCH greater accuracy to improve Time in Range and A1C. The AI-enabled analysis engine can even read menus (in multiple languages) and provide guidance for dosing. Short video demo: https://youtu.be/L0LD8AxNX0Q Review the docs in “/Loop/Documentation/FoodSearch 2.0 Docs/” for comprehensive documentation for Loop's Food Search functionality, including AI-powered nutrition analysis and advanced diabetes management recommendations. API setup guides are provided so the user can enter their personal AI API keys to enable AI food analysis. This new PR (Food-Search 2.0) fixes compatibility bugs from the initial commit and adds Advanced AI Analysis including FPU analysis, and Dynamic Dosing recommendations. Requesting a review from the maintainers? @ps2, @marionbarker, @loudnate <I will post new screenshots here after submitting this PR>
Deleting older docs
To prevent breaking Live Activities customizations
Added xcodeproj/project.pbxproj to .gitignore fixed build errors caused by AbsorptionTimePickerRow function
- Red X delete buttons in Food Details so users can adjust what food items they plan to eat and not eat - Automatic nutriments total & absorption time recalculations when items are deleted
included accidentally so I'm removing it. should remain unchanged.
This reverts commit 6f6569f.
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.
Introducing a new AI-enabled food search capability for Loop. Loop has helped me become a better diabetic and I would love to give back to the community by contributing this new feature for Loop, which I believe will benefit all Loop users.
PROBLEM WE'RE SOLVING: Diabetics often lack nutrition knowledge when estimating carb intake. And we need that knowledge when we’re making dosing decisions, especially when eating out at restaurants - this knowledge is the single most important tool we have to improve our Time in Range and A1C. Loop's Food Search feature uses barcodes and AI analysis to provide accurate nutrition information and advanced diabetes management recommendations.
NEW FEATURE'S IMPACT: The Food Search system is a comprehensive food analysis and nutrition tracing solution integrated into Loop for improved diabetes management. It provides multiple search options including text, barcode scanning, and AI-powered image analysis that produces comprehensive nutrition data and dosing suggestions via diabetic notes. With Food Search, we can enter a meal bolus with MUCH greater accuracy which should improve Time in Range and A1C. The AI-analysis engine can even read menus (in multiple languages) and provide guidance for dosing.
Short video demo: https://youtu.be/L0LD8AxNX0Q
Review the docs in “/Loop/Documentation/FoodSearch 2.0 Docs/” for comprehensive documentation for Loop's Food Search functionality, including AI-powered nutrition analysis and advanced diabetes management recommendations. API setup guides are provided so the user can enter their personal AI API keys to enable AI food analysis.
This new PR (Food-Search 2.0) fixes compatibility bugs from the initial commit and adds Advanced AI Analysis including FPU analysis, and Dynamic Dosing recommendations.
Requesting a review from the maintainers? @ps2, @marionbarker, @loudnate
Feature is hidden behind a Feature Flag in Loop > Settings > Enable Food Search:

New Search for Food section on the Add Carb Entry view:

Simple text search:

Barcode scan search for high accuracy of packaged foods:

AI-enabled food image analysis engine in action:

AI-Analysis results with comprehensive analysis details including an item by item breakdown of the meal:

Even more detail about how Portions & Servings were calculated and Diabetic Notes to advise during dosing:

Advanced AI Analysis Mode for those who want to geek out on FPU and Advanced Dosing Recommendations:

Food Search Setup screen. Pick the AI service you prefer, enter your own API keys:
