For our task, we require a collection of labeled photos of fruits. As you may recall from Chapter 1, Introduction to Machine Learning, this type of machine learning problem is known as supervised learning. We need our model to take in an image and return the label of what it thinks the image is, also known as multi-class classification.
Go ahead and collect photos of fruits. Create ML allows for multiple ways of organizing your data, but I find that ad hoc collection is easiest done by organizing it in folders, as shown here:
Source: http://www.image-net.org/
Here, we have organized our data into folders, where the folder name is used as a label for its contents. An alternative is labeling each image, where each instance of a specific class has a suffix number, for example banana.0.jpg
, banana.1.jpg
, and so on. Or you can simply pass in a dictionary of labels with their associated list of image URLs.
At this stage, you may be wondering how many images you should get. Apple...