Nutrition facts Label
This section describes how to build your custom OCR API to extract data from Nutrition Facts Label using the API Builder. A Nutrition Facts Label lists the nutritional content, the serving size, and the calories for a recommended serving of a food product
Prerequisites
You’ll need at least one Nutrition Facts Label image or pdf to test your model once created.
Define Your Nutrition Fact Label Use Case
Using the Nutrition Fact Label below, we’re going to define the fields we want to extract from it.
- Serving Size Gram
- Total Fat Gram
- Total Fat Daily Value
- Calories Per Serving
- Total Carbohydrate Gram
- Nutrients:
- Name
- Weight
- Daily value
That’s it for this example. Feel free to add any other relevant data that fits your requirement.
Deploy your API
Once you have defined the list of fields you want to extract from your Nutrition Facts Label, head over to the platform and follow these steps:
- Log into your Mindee account. You'll land on the My APIs page.
- Click the docTI tab.
- Click the Create a new API button.
On the Set up your API section, fill in the required information. Give the API a name, a description (optional), and a cover image(optional) and click on Next.
Define Your Model
Click on the different fields to add them to your list
Using the interface, you can manually add each field for the data you are extracting. For this example, here are the different field configurations used:
Field Name | Field Type | Example |
---|---|---|
Serving Size Gram | Number | 210 |
Total Fat Gram | Number | 6 |
Total Fat Daily Value | Number | 3 |
Calories Per Serving | Number | 150 |
Total Carbohydrate Gram | Number | 32 |
Nutrients | Object [List] | |
Nutrients - Name | String | Vitamin D |
Nutrients - Weight | String | 3 mcg |
Nutrients - Daily Value | String | 10% |
Once you’re done setting up your data model, click the Create API button at the bottom of the screen.
You are now ready to test your API on the live interface.
Questions?
Join our Slack
Updated 8 months ago