- Decide on a platform to train your AI model
- Gather your initial dataset and start training your AI model for your project
These are the activities for this lesson:
YOUR DATASET
By now you should have gathered your data for your dataset. As a reminder, there are three ways of collecting data:
- Collect training data from your community
- Invention gathers data with sensors or user input
- Use data from public datasets for training data
You also should have decided on what type of data you want to use in your dataset – images, text, sounds, or poses.
Your dataset should meet the following criteria:
- The right kind of data
- Lots of examples
- Varied examples – diverse and representative (unbiased)
TRAINING PROCESS
Input data
By uploading it, or through a webcam for images
Train
Run the data through a learning algorithm.
Test
Using new inputs, check if your model is accurate.
CHOOSE THE PLATFORM
The platform you choose should allow you to:
- train the right data type (images, sounds, text, etc)
- use the model to integrate into your proposed solution (web or mobile app)
You are not limited to these platforms, but these are simple and user friendly options for integrating with a mobile or web app.
The best platform for your project may depend on the type of data in your dataset, as not every platform can train every type of data.
Try out one or more of the tutorials from one or two platforms to see which platform will help you achieve the goals for your project.
Website: https://teachablemachine.withgoogle.com/
Classification types: images, sounds, poses
Technovation Integrations: App Inventor, Python, other integrations using APIs
Here are three tutorials to try out Teachable Machine using different data types.
- Image Classification with bananas
- Sound Classification with snaps, claps, and whistles
- Pose classification to detect head tilt
Website: https://machinelearningforkids.co.uk/
Classification types: images, sounds, text, numbers
Technovation Integrations: App Inventor, Python
Machine Learning for Kids has many example tutorials and worksheets to learn more.
You will need a mentor or teacher to sign up for a teacher account. Then they can set up a student account for you.
Check out these examples/tutorials using MachineLearningForKids.
- Skin Clin a Technovation team Scratch project to detect skin diseases
- app to sort biomedical waste by a Technovation team with a full tutorial
- classify images of irises using the public dataset example from Unit 4 Datasets
Website: https://appinventor.mit.edu/explore/ai-with-mit-app-inventor
Classification types: images, sounds, poses, face mesh
Technovation Integrations: App Inventor mobile apps
If you are already using App Inventor as your coding platform for your project, this is a good option.
Here are some tutorials to get started:
- Video Tutorial to train a model to detect healthy vs diseased fruit
- Tutorial to train a mobile app to recognize your voice
- Dancing with AI tutorial to detect poses
Website: https://www.ximilar.com/services/computer-vision-platform/#image-classification
Classification types: images
Technovation Integrations: Thunkable, web apps (using APIs)
Although there are other options, this is a good one if you are using Thunkable as your coding platform.
Check out the first half of this tutorial to learn how to use Ximilar. The second half will be shown in the next unit, when you integrate your model with Thunkable.
- Video Tutorial to train a model to detect different types of coral reefs
The platforms above are just recommendations for easy on-ramps to training and using AI models.
There are many more advanced AI tools available. Some are listed in the Additional Resources section. They may require using advanced languages like Java, Python, or Swift and will most likely entail using APIs (Application Programming Interface).
ACTIVITY: TRAIN YOUR MODEL
Train your AI model using your dataset
- Choose the appropriate platform for your project.
- Train your AI model using your dataset.
- If you haven’t completely gathered all the examples for your dataset, add what you have.
- Add more as you collect more data.
- Save your project/model so you can return to it later!
- After training your AI model, test it with some additional examples. These test examples should be different from the training examples you used.
- If your model is not very accurate (over 70%), add more training examples, retrain, retest.
Mentor Tip
Best practices: Training models is hard! Even Google gets it wrong. Their AI was trained but still started outputting wrong results! Don’t give up!
Guiding Questions to ask students: How accurate do you want your AI model to be? If it can not be 100% accurate, what is an acceptable answer? 80% of the time? Does that depend on the risk of what you are using the model for? For example self driving cars have to be pretty accurate otherwise they might hurt someone but google search results apparently have a much lower bar.
Mentor tips are provided by support from AmeriCorps.
REFLECTION
This activity is just about training the model.
In the next unit, you’ll on integrate your model into a software platform to turn into a working app.
REVIEW OF KEY TERMS
- Platform – software or website that allows its users to perform a task or use a tool
- Classification – Machine learning model used to identify or categorize different data
ADDITIONAL RESOURCES
Here are some more advanced platforms for building AI models.
Note: If you decide to use these tools, be sure to double check the pricing. Some tools are free to use depending on how many users use your app.
Google Cloud AI Tools has many APIs and tools for building your own machine learning models.
Also from Google, this platform is great for conversational apps.
These videos show you how to use DialogFlow with AppSheets to make a mobile app.
This tool allows you to write and run Python code in the browser, and works well for machine learning application.