← Pattern Detector projects: projects

C. Combined pattern detector

Open project

Build a Python app where a trained model recognises something, and rules you write decide what to do about it.

Each part does the job it is best at. The model handles the messy, real-world input, such as a photo, a pose or a sound. The rules handle the parts you can describe exactly: counting, scoring, looking things up, and deciding what to do when the model is not sure.

Before you start: you have built one rules-based app (project A) and one trained app (project B).

The parts fit together like this:

input → trained model → label + how sure → your rules → response

Your rules should use how sure the model is, not only its label. What does your app do when it is not sure?

Before you start, write one sentence: who is it for, and what will it tell or do for them?

What to hand in

  • Your app: the .py file, your model file and any data files.
  • A pipeline diagram, with the reason each part is a model or rules.
  • A testing record for each part on its own and for the whole app, including inputs where the model was unsure or wrong.
  • A reflection: which part caused the most problems, what you would change, and who could be affected if your app got it wrong.

Check your app before you hand it in

  • Clear result, in words your user understands.
  • Honest about how sure it is: low-confidence results are handled, not hidden.
  • Useful response that needs both parts: take either part away and the response gets worse.
  • Fits your user: settings or options they can change.
  • Tested as a whole, not just part by part.

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.

Ways it could look when it works

These show a finished project at about the level to aim for. Yours will be different, and that is fine.

Rock paper scissors: the model reads your throw, and rules play the round, keep score and end the game. (A computer-made hand from the Rock Paper Scissors dataset, CC BY 4.0, Laurence Moroney.)
Rock paper scissors: the model reads your throw, and rules play the round, keep score and end the game. (A computer-made hand from the Rock Paper Scissors dataset, CC BY 4.0, Laurence Moroney.)
A secret knock door: the model hears each sound, and rules check the last three sounds against the secret pattern.
A secret knock door: the model hears each sound, and rules check the last three sounds against the secret pattern.

You'll use

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.

Where you'll work

This project runs on your own computer, not in this page.

Optional: paste your code to light up the skills it usesNothing is sent anywhere. It stays in this browser, and Download my code saves it.

Milestones

Tick each one when it is true of your project. Nobody marks it: be honest with yourself.

Make it yours

Looking back

Tick every milestone first.

Pattern Detector projects · project badge

★ C. Combined pattern detector

Built with

Milestones

The hardest part