Bird detector and classifier implemented using a Raspberry Pi and Tensorflow Lite.
The goal of this project is to implement a Smart BirdCam. The BirdCam should be fully automated, left to watch a bird feeder and take a picture when a bird shows up. The image should then be sent to some server, or locally, to then be run through a classifier and then stored into a directory for that birds species. Hopefully, the user can notice trends in what birds are visiting them and get some cool pictures as well.
https://www.tensorflow.org/datasets/catalog/caltech_birds2011 - First Candidate.
https://tfhub.dev/google/lite-model/aiy/vision/classifier/birds_V1/2 - Birds V1.2 ; Tensorflow mobile bird classification model using the MobileNetV2 architecture and the iNaturalist dataset.
I suggest this kit for the pi. Comes with power supply, case for the pi, and hdmi adapter for a computer screen. Could always just get the pi alone and a power supply also and just ssh into the pi. Also, I recommend the SanDisk Extreme 32Gb SDHC Card.
Most of these should be available through Anaconda, so I would start my installing that.
PIL - May change to pillow numpy imutils cv2 tflite_runtime.interpreter
Code Maintenance
- Try and object orient some of the code or make the different scripts into modules.
- Create a main script.
Streaming
- Connect Pi and computer using ssh.
- Create script for Pi to stream video
- Create script on computer to do steps 1 and 2.
Motion Detection
- Create script to take a picture when a certain amount of change is detected in the video stream.
- Try and find a balance for the motion detector to not pick up sway of bird feeder and only pick up birds.
- Implement some sort of timer. If some change is detected for more than x amount of time, take a picture.
Machine Learning
None right now!
Organize Data
- Script to take picture and save it to
PicturesIn
Other
- Create testing script to run the pictures from the TestingImages directory through the image_preprocessing.py script. Use pytest or unittest.
- bash script to download all of the dependencies
- Add common names of birds to the labelmap.
The camera will be set up to observe the bird feeder. What should be done to prevent false positives when the sway of the bird feeder indicates change?
Squirrels like to mess with the bird feeder alot also. Should Tensorflow train on squirrels as well?
Changes in time of day could also cause false positives. Find a way to fix this or perhaps just restart the script every hour or so?
How to detect change between a brown bird and brown background?
Optionally add squirrels?
- Setup WebApp for the whole thing to run through.
- Connect the images taken to a SQL database.
- Send the images taken to AWS
https://www.tensorflow.org/lite/guide/get_started#2_convert_the_model_format https://www.tensorflow.org/lite/guide/python https://www.tensorflow.org/lite/models/image_classification/overview