I created an app that uses supervised learning to classify images. The app can either take a picture or upload one from your photo library, and the machine learning algorithm will classify it.
The app has 3 main parts:
— A place to either take a photo or select from your photo library
— A place to display the Image
— A place for the model to classify the image
Training the model
To show I create the model, I’m going to use classifying flowers as an example.
To train the model, I used Create ML. It works by applying machine learning algorithms into the training data to help create predictions to use. Create ML uses a transfer algorithm. This means that it uses another algorithm to develop its own models. Although it never explicitly states which model it uses, I would assume it’s similar to a supervised machine learning algorithm, since its goal is to classify the data instead of finding the pattern in the data.
1. AI for CFD: Intro (part 1)
2. Using Artificial Intelligence to detect COVID-19
3. Real vs Fake Tweet Detection using a BERT Transformer Model in few lines of code
4. Machine Learning System Design
To create the model, I started with some training data. Training data is what the machine learning model references to help create and find the classes. In the training data, there were images with different angles, backgrounds, lighting, etc. The images had to be located in the right classes with an equal amount of photos.
In Create ML, certain options can be applied to the images such as Crop, Rotate, Blur, Expose, Noise, and Flip. These features also worked to help get more variety in the pictures.
Once all the training data has been imported, I started the training process. This process can vary on how much time it takes, depending on how much data and classes there are. Once it’s finished, the model has developed some sort of formula/algorithm to help create the model.
The next step is testing. The testing phase can help determine if the models need to be retrained or if it’s good and ready for use.
Once the testing finished, the model is ready to be exported and put into the app.