Practice and reinforce the concepts from Lesson 18
In this project, we will explore how image classification works through Teachable Machine, a platform by Google to create machine learning models easily. We are going to classify images into different categories of shapes. The image dataset we will use is the 300 hand-drawn images of squares, circles, and triangles dataset from Kaggle.
Total Activity Time: 45-60 minutes
💻 Time Required: 5-10 minutes
💡 If you don't have a Kaggle account, signing up is free and only takes a minute. You'll need an account to download datasets.
Step 4: Save the Dataset
- When the download prompt appears, save the file as shapes.zip
- Choose a folder you can easily find later (e.g., "Program G" folder or your Desktop)
- Remember where you saved it!
Step 5: Extract the Dataset
- Navigate to where you saved shapes.zip
- Right-click on the file
- Select "Extract All" (Windows) or double-click (Mac)
- A folder named shapes will be created
Step 6: Verify Folder Structure
- Open the newly created shapes folder
- Verify it contains exactly three subfolders:
- squares
- circles
- triangles tip Each folder should contain 100 images of the respective shape. If you don't see all three folders, try extracting the zip file again.
💻 Time Required: 5 minutes
💡 Make sure the class names match exactly as shown above - this will help when uploading the correct images to each class.
Phase 3: Uploading Training Data
💻 Time Required: 10-15 minutes
Step 11: Upload Square Images
- In the Square class section, click the Upload button
- Select Choose images from your files from the dropdown menu
Step 12: Navigate to Square Images
- In the file browser that opens, navigate to your extracted shapes folder
- Double-click to open the squares subfolder
Step 13: Select All Square Images
- Once inside the squares folder, select all images:
- Windows: Press
Ctrl+A
- Mac: Press
Command+A
- Click Open to upload all selected images
- Wait for all 100 square images to upload
Step 14: Verify Upload
- Check that all square images appear under the Square class
- You should see "100 image samples" displayed
- The thumbnails should all show square shapes
Step 15: Repeat for Other Shapes
- Repeat steps 11-13 for the Circle class:
- Click Upload -> Choose images -> Navigate to circles folder -> Select all -> Open
- Repeat steps 11-13 for the Triangle class:
- Click Upload -> Choose images -> Navigate to triangles folder -> Select all -> Open tip Take your time with this step. Make sure you're uploading the correct shape images to each class. Mixing them up will confuse your model!
💻 Time Required: 5-10 minutes
⚠️ Warning Do not close or switch tabs while training! The process will stop if you navigate away. Training usually takes 2-5 minutes depending on your computer.
💡 You'll see a progress bar and accuracy metrics while training. Higher accuracy percentages (closer to 100%) mean your model is learning well!
Phase 5: Testing the Model
💻 Time Required: 5-10 minutes
Step 18: Test with Webcam
- After training completes, the preview panel will activate
- Draw or hold up different shapes to your webcam
- The model will show predictions with confidence percentages
- Test all three shapes to ensure accurate classification
Step 19: Test with File Upload
- Click the dropdown menu next to "Webcam"
- Select File from the options
- Click "Choose images from your files"
- Upload any shape image to test
Step 20: Verify File Testing
- Check that uploaded images are correctly classified
- The correct shape category should show the highest percentage
- Test with different images to ensure consistency tip If your model isn't performing well, you might need to retrain with more diverse images or check that your training data was uploaded to the correct classes.
💻 Time Required: 5 minutes
ℹ️ Important Submission Requirements
- Make sure to copy the ENTIRE link
- Test your link in a new browser tab before submitting
- Keep your model link saved - you might need it later!
- Submit before the deadline
Time Required: 30-45 minutes
Build a face mask detector using Teachable Machine that can identify whether someone is wearing a face mask.
Time Required: 45-60 minutes
Take your trained model to the next level by implementing it as a Python application!
💡 Getting the Keras File To obtain the converted_keras.zip file for the Python implementation:
- After training your model, click "Export Model"
- Switch to the "Tensorflow" tab
- Select "Keras" format
- Click "Download my model"
- Save the converted_keras.zip file
Problem: Images won't upload
Problem: Model accuracy is low
Problem: Webcam test not working
Problem: Export link not generating
⚠️ Need Help? If you encounter any issues not listed here, ask your instructor or post in the class forum. Include screenshots of any error messages!