Got this working with a load cell attached to a bird feeder, for detailed instructions on how to do this check out my blog on the topic. All the code for this step can be found it the bird_weights
dir.
This part is built around a simple script which spits out photos of birds when they land on the feeder along with their weights to the images
dir, for example:
images/bird_20250801_120750_19.5g.jpg
This part was much tricker that the first, initially I tried using this bird species classifier model from HuggingFace but it didn't have the coverage I needed for the kinds of British songbirds who are visiting my bird feeder. I experimented with training my own models using some of the examples on the TensorFlow website (including this one) but couldn't get good results. My DIY'ed models always ended up over fit to my data and in the end I couldn't even get a binary classifier working to see if a fox was present in the image.
Luckily I found this video by Jeff's Pi in the Sky about an older bird classifier Jeff used in his own bird recognition project that was initially trained by SecretBatCave. This model still has some problems (the model seems to default to "cat" for images that should probably be categorized as unknown, can't recognize regular visitors to my bird feeder like Great Tits etc) but is pretty good at recognizing Robins so ended up saving this project.
I adapted Jeff's implementation of using the model for inference to label images produced by the script in part 1 and move them to the identified_images
dir, for example:
identified_images/robin_20250801_193326_21.1g.jpg
Zero shot image classification
Final Result