ccrenfroe / BirdCam

Bird detector and classifier implemented using a Raspberry Pi and Tensorflow Lite.
13 stars 1 forks source link

BirdCam

Purpose

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.

Dataset

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.

Hardware

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.

Dependencies

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

Docs

For the Camera

Picamera Raspistill Raspivid

For Motion Detection

OpenCV

For Object Classification

Tensorflow Lite

Tasks

Code Maintenance

Streaming

Motion Detection

Machine Learning

None right now!

Organize Data

Other

Things to think about

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?

Potential future work

Useful sources

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