Comments (4)
@raphael0202 @stephanegigandet one reuser just told us that he successfully fed OCR into ChatGPT and output a nutrition JSON.
My guess is that he might have provided a category to aid the model. I've made a quick n' dirty test even without a category that seems to work well.
https://images.openfoodfacts.org/images/products/433/725/629/5260/2.json
https://images.openfoodfacts.org/images/products/433/725/629/5260/2.jpg
Can you parse the nutrition facts from this string into a JSON ? Durchschnittliche\nNährwerte\n%-RM*\npro 100g\n2086 kJ\n499 kcal\n26,0g\npro 100g\nEnergie\n25%\n37%\nFett\ndavon gesättigte\nFettsäuren\nKohlenhydrate\ndavon Zucker\nEiweiß\nSalz\n14,0g\n58,0g\n32,0g\n6,2g\n0,71g\n70%\n22%\n36%\n12%\n12%\n*RM = Referenzmenge für einen durchschnitt-\nlichen Erwachsenen (8400 kJ/2000kcal).\n
Based on the information given, it seems that you want to convert the provided German nutrition facts into a JSON object. I will assume that the values next to "pro 100g" and "%-RM*" respectively are the actual values per 100g and the percentages of the recommended daily intake.
Here is how you can represent it:
{
"Nährwerte": {
"Energie": {
"per_100g": {
"kJ": 2086,
"kcal": 499
},
"daily_percentage": 25
},
"Fett": {
"per_100g": "26.0g",
"daily_percentage": 37
},
"gesättigte Fettsäuren": {
"per_100g": "14.0g",
"daily_percentage": 70
},
"Kohlenhydrate": {
"per_100g": "58.0g",
"daily_percentage": 22
},
"Zucker": {
"per_100g": "32.0g",
"daily_percentage": 36
},
"Eiweiß": {
"per_100g": "6.2g",
"daily_percentage": 12
},
"Salz": {
"per_100g": "0.71g",
"daily_percentage": 12
}
},
"Referenzmenge": "8400 kJ/2000kcal"
}
from openfoodfacts-ai.
Following a discussion with @raphael0202, We might want to see if our classic nutrient detection could be providing on-par performance, before rushing into this.
from openfoodfacts-ai.
Not on this product: https://robotoff.openfoodfacts.org/api/v1/predict/nutrient?ocr_url=%20https://images.openfoodfacts.org/images/products/433/725/629/5260/2.json
As the nutritional values are not next to the nutrition mentions in the OCR text.
from openfoodfacts-ai.
GPT3.5 output (incorrect prediction)
{
"Nährwerte": {
"Energie": {
"pro 100g": "2086 kJ",
"%-RM*": "25%",
"kcal": "499"
},
"Fett": {
"pro 100g": "26,0g",
"davon gesättigte Fettsäuren": "58,0g",
"%-RM*": "37%"
},
"Kohlenhydrate": {
"pro 100g": "32,0g",
"davon Zucker": "6,2g",
"%-RM*": "12%"
},
"Eiweiß": {
"pro 100g": "14,0g",
"%-RM*": "12%"
},
"Salz": {
"pro 100g": "0,71g",
"%-RM*": "12%"
}
},
"Referenzmenge": "RM = Referenzmenge für einen durchschnittlichen Erwachsenen (8400 kJ/2000kcal)."
}
from openfoodfacts-ai.
Related Issues (20)
- Use LLMs to create data models for Open Products Facts categories
- Use LLMs to spellcheck/lowercase ingredient lists HOT 1
- Use LLMs to retrieve properties on ingredients/additives
- Use LLMs to generate tweets based on specific categories / tags…
- Use LLMs to generate tweets based on specific categories / tags…
- Use LLMs in Odoo Connect
- Use LLMs in Odoo Connect
- Use LLMs to summarise long texts about Quality Schemes
- Use LLMs to parse a natural language complex meal into foods with nutritional values for nutrition/environment tracking
- Use LLMs to retrieve food wine pairings
- Turbocharge the mobile app using LLMs and Multimodal models
- Use LLMs to extract ingredient lists from raw text HOT 3
- Improve image resolution
- Predict an image crop of nutrition tables HOT 1
- Use LLMs to detect origin of ingredients
- Extract nutrients data from US products nutrients table photos
- Use large language models (LLM) to perform ingredient list spellcheck
- Use a multimodal LLM to extract the likely Product name and brand as JSON
- Use LLMs to perform Data Quality analysis of products, and propose remediation steps
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfoodfacts-ai.