Open project
Build a Python app that recognises your own groups of pictures, body poses or sounds, using a model you train yourself, then responds in a way that helps someone.
Some things are easy for people to recognise but almost impossible to describe as rules. Every breed of dog, every angle and every kind of light would need its own rule. Instead you show the computer lots of examples of each group (a class), it finds its own patterns, and then it uses them on things it has never seen. Its confidence in an answer, a number from 0 to 1 (0.8 means 80% sure), is not the same as being right.
Before you start, write one sentence: who is it for, and what will it tell or do for them?
What to hand in
.py file and your model file.Check your app before you hand it in
Good habits. Only record yourself, or people who have said yes. Check what is behind you before you record. Your pictures and sounds stay on your computer. The model file holds only your class names and trained numbers, but a saved project file also holds tiny copies of your photos (in Sounds mode, just sound scores), so do not share it if it shows people.
These show a finished project at about the level to aim for. Yours will be different, and that is fine.


These light up when code you paste uses them. The starters already use some of them, so check the parts you wrote use them too. Click one to see where you learned it.
This project runs on your own computer, not in this page.
Tick each one when it is true of your project. Nobody marks it: be honest with yourself.
# Plan (written before training):
# User: someone hard of hearing, at home.
# Job: tell them about sounds they would want to know about.
# Classes: Baby crying, Dog barking, Fire crackling, Nothing urgent# I tried I expected It said How sure
# a sneeze Nothing urgent Baby crying 0.61 (now "Not sure")
# a rooster Nothing urgent Dog barking 0.998 (fooled, and sure)
# a chainsaw, first model Nothing urgent Fire crackling 1.00 (fixed by adding chainsaws)ADVICE = {
"Baby crying": "The baby is crying. Go and check on them.",
"Dog barking": "The dog is barking. Someone may be at the door.",
"Fire crackling": "Something is crackling like a fire. Check the kitchen and the heaters now.",
"Nothing urgent": "Nothing to worry about.",
}if score < cutoff:
# Not sure is passed on, not dropped: a missed alert costs more than a false one.
return "Not sure", f"I heard something, maybe {label} ({score:.0%}). Have a look to be safe."
return label, ADVICE[label]Tick every milestone first.
You built it with: