Table of contents
During a meet up last month, a friend told me about the current project on a farm in New Zealand. They want to build a system to grade their fruits and AI is the technology they are looking for. It inspired me to write about how machine learning can help in solving such a problem.
The grading task
Given an apple, we need to sort it to correct category in three available categories: e.g. grade 1, 2, 3. Grade 1 apples have the best quality while 3rd ones are the worst.
So it is a classification problem and can be solved effectively using machine learning.
Data and features
To build the grading model, we will need relevant data, i.e. data of different apples. As shown in Fig 1, the information can include colours, shapes, weight, etc. Nevertheless, we need data with labels. It means that given an apple in the sample set, we should know its grade, e.g grade 1 or 2, or 3.
We may have several features of an apple to consider in a grading model. We need feature engineering to select the right feature set for accurate grading.
As discussed, the grading problem is similar to the classification problem. Unfortunately, I don’t have the real data for those fruits. Instead, we will create some fake data of three classes and try to use a pure python to implement the classifier with Multilayer Perception.
In part 2, we will use TensorFlow to reimplement this project.