Nutritional Facts for foods

 

Nutritional Facts for food

 

Create AN AI MODEL TO FIND NUTRITION FACTS of different types of FOOD

SOLVING A CLASSIFICATION PROBLEM

Identify the nutrients facts of your food whether fat, carbohydrates, or proteins, etc.

Nutrition Facts
 

 

The problem

Staying healthy depends on the quality of the food that you eat. Depending on your nutritional needs, you may need to have more or less of a particular nutrient.

This makes identifying the required nutrients necessary.

By taking on classification problems, humans can understand the world better. The application of this technique in the real-world is a rather more challenging task because of the fine lines between classes. However, AI makes classification despite these fine lines easier and faster.

The boost in AI’s capacity to do this has come from the improvements in computing power, the explosion of big data, and the advancements in deep learning models.

In this project, you will build a model to identify the nutrition details of some common foods using a dataset of food images. 

 

 

what is classification? 

Although you will learn more about classification in the second course of Level2, Supervised Learning, in the AI Citizenship Program, here’s a brief idea: classification is a technique under supervised learning in which a model takes in input, learns from the input, and then proceeds to classify new input it is fed with.  


 

learning outcomes

This project will teach you to:

  • Gather data and divide it into training and testing datasets.
  • Create an ML model that can classify food images according to key nutrition details.

 


 

The data

The dataset involved here is a set of images of 4 types of foods. Each of these foods has its nutritional details labeled in terms of how much calories, fats, proteins, saturated fats, carbohydrates, fibers, etc. are present.

A well-trained model will be able to classify new food images it comes in contact with.

Be sure to split the dataset into training and testing datasets to ascertain the accuracy of the model.  


 

project steps:

1. Meet your AI Identity

Meet your AI Identity. You will teach your AI how to complete tasks as a human would. In due time, your AI Identity will grow more intelligent as you train it some more to take on different tasks with multiple projects. Eventually -in the future- you will be able to transfer your AI identity's intellect into a physical robot you can interact with in the real world.  


 

2. DEFINE THE PROBELM. START YOUR PROJECT

Begin every project by naming the project so you can keep track of what project it is exactly. Every project involves the steps of dataset preprocessing, model building, evaluation, and deployment.

By creating projects, working with others becomes more convenient and easier.

Click CREATE once you have added a project name and description. 


 

3. SELECT YOUR ML MODEL

Here, from the options of a Computer Vision model (MAKE ME SEE), Natural Language Processing model (MAKE ME READ), Voice Recognition (MAKE ME HEAR), and a tabular model (MAKE ME COUNT), you will select a Computer Vision model (MAKE ME SEE) to enable your model to classify food images according to nutritional details.

This model will enable you to train your AI transformer to categorize food images according to key nutritional facts.

Keep track of the newer models that will be added to the platform. Each one of these models will enable your AI transformer to take on and solve new problems.


 

4. COLLECT YOUR DATA

Your source can either be Kaggle or the Nutritional Facts for foods dataset from the dataset library.

Take note that data gathering is a very crucial stage of an ML project with data preprocessing taking at least 70% of the time. Therefore, you will need to carry out this stage well.

 

 

5. TRAIN YOUR MODEL 

Use the data you have gathered to train your AI transformer. “Training” your model refers to teaching it to categorize food images according to their key nutritional details.

A well-trained model will be able to categorize new food images according to nutritional facts.

To do this, click TRAIN ME. Be patient for a moment while this process goes on. 


 

6. TEST YOUR MODEL

With your AI model trained now, it is time to test the model by using a new set of food images. Be sure not to use an image that was used in the training phase. You will be cheating if you do.

Use the PREVIEW section to assess the performance of your model. Just upload the food images from the testing dataset.

The confidence score will help you know well the model has been trained and if you are fine with it, export the model.

If you do not like the confidence score, return to step 4 and determine whether the image dataset used was sufficient in number.


 

EXPORT YOUR MODEL

Exporting your model is the next step after you are satisfied with the confidence score. You can export using our API into your website, application, robot, or any other machine.

Return to step 4 if you got a low confidence score. Doing this helps you review the training data class to be sure it is of high quality (clean) and quantity.

Your model is only as good as the data you feed it.