For our herbal drugs image classifier we needed a program that was able to load image files from the user and use the data inside them, so as a first step, we developed this simple mobilenet image classifier.Feeling curious, Mr.Holmes?
This first simple example uses the MobileNet database and model, without any additional training (which will be featured onto our next model).
Alright, so we already have an imageclassifier that uses a preloaded model, one that wasn't custom made to serve our purpose -herbal drugs image classification. What is the next step? Well, we're about to transform it into a trainable program, one that can learn how to recognize different objects in the images it sees. And as I did before, you might ask yourself, how do we do this? How do you train a pre-made model? Well, thanks to the creators of ML5, users like us can 'teach' the MobileNet model, using the same image processing methods (since we can't change that using such a beginner-friendly and surface-level library), giving it a new training set (composed of images that we'll have to classify by hand and their corresponding labels e.g.: "Look, ml5 program, these picture feature a Rosemary leaf on them; but this next set doesn't, it features grapevine Leafs; and this other set has ginkgo leafs on it... Now train yourself (which you'll do by processing those images and finding common aspects between the pictures under every label and therefore setting up the weights in your model) and you'll be ready to predict the label of other pics of leafs under one of those three classes").
This is achieved by using the feature extraction program from ml5.Here you'll find an example that I used to understand how it works. Here you'll find my image classifier trainer using feature extraction (still work in progress).