Run your new network
Now you can run a neural network that is trained on your environment with a single command:
python3 run.py example/model.h5
Wave your hands in the air. Does it cheer? Even if your audio is not configured, the console prints the class predicted and display either:
- 0: Cheering.
- 1: Sitting in view but not cheering.
- 2: Random behaviors. For example, standing, being out of the picture, and unexpected lighting conditions.
You can do a lot more than cheer. You can replace the files in the folder named sounds, and train a model to recognize 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, like setting GPIO pins, and sending alerts and emails. The applications are limited only by your imagination.