This is a set of utilities for training and running a Keras classifier that can determine whether an undesirable cat is trying to enter your home, and convince it to go elsewhere.
The neighbors cat kept stealing our cat food. Many low-tech solutions for keeping their cat out were explored. Eventually high-tech solutions were all that remained.
Yes it does:
Their cat only visited twice before deciding our food just wasn't worth the effort. Our own cat is able to come and go freely without being squirted.
TrainClassifieris a Jupyter notebook which can be used to train a Keras model and export it as a Tensorflow Lite model to be used with the classifier.badcat.detectoris a multi-threaded process that captures frames from the camera, classifies them, and stores video of detected motion.badcat.generate_imagescan be used to extract training images from a directory of videos (organised by category) and save them to an output directory.badcat.test_videocan be used to run the classifier against a specific video for testing.badcat.utilscontains some shared OpenCV based image processing functions.
