Run your new network

Now you can run a neural network trained specifically on your environment with a single command:

python example/model.h5 

Wave your hands in the air. Does it cheer? Even if your audio is not configured, the console will print the class predicted and display either:

  • 0: Cheering!
  • 1: Sitting in view but not cheering.
  • 2: Random behaviors such as standing, being out of the picture, unexpected lighting conditions and so on.

There is a lot more that can be done than cheering! You can replace the files in the folder named "sounds" and train a model to recognise completely different gestures, objects or situations. For example, you can teach a Pi to:

  • Greet you by name.
  • Set off an alarm when someone is in view. For example, try hiding beneath a cardboard box or behind a cushion and sneaking up on it.
  • Shout "THE COFFEE IS READY" when the coffee is ready.
  • Tell the dog to get off the sofa when the dog gets on the sofa.

With a little python programming, you can also make your Pi do more interesting things in response to camera input such as setting GPIO pins, sending alerts and emails. The applications are limited only by your imagination!

How did you get on?

Tell us about your successes, failures, and your own machine learning projects. Email us at: to start the conversation.

Train a network on the data Next steps