Logo

Inspiration

My inspiration for this project came from a GoPro timelapse I took of a bird feeder outside my house. I was curious how many birds would share the space at once, especially which species intermingled the most. Then I thought what if instead of footage of my backyard it was trail cam footage in the Amazon rainforest or other remote area? I could use that footage to identify endangered animals, extrapolate their numbers and locate areas to target for conservation.


I have worked on computer vision projects from scratch in the past and it is quite a bit of work. When I discovered Roboflow I wanted to try a proof of concept project to see how it works and I thought back to my idea of identifying birds. Roboflow made starting up a computer vision model remarkably easy and straightforward. My model is based on a youtube video of a bird feeder because my video was quite far away and for this prototype I wanted to get a basic understanding of what I was working with. I cannot stress enough how simple this was to use and how incredibly impressed I am based on my prior experience creating computer vision models.

Results

mAP: 96.9%, Precision: 92.4%, Recall: 90.2%

The model was exceptional at identifying classes from images sampled from the original video. A clip of the full output video can be seen at the top. However, I tried to run the model on pictures of cardinals I found on the internet but had varying results. Sometimes it was able to classify it correctly but often had a low confidence. Like most shortcomings of machine learning this is likely due to the training. With a more robust training set including pictures outside the original video and more augmentations I am sure it would have performed better on these examples.

plot 1plot 2

I created these plots quickly with matplot to illustrate the bird's interactions. The first plot shows a breakdown of bird type visits by hour. I should note hour is a loose term as I randomly divided up the video for my proof of concept. The second plot shows which birds shared the feeder together. Theoretically this shows which species are compatible and intermingle, but this heatmap is admittedly not very helpful. (Better analysis and ggplots coming soon) Since this was just a prototype, I want to further this effort by contacting conservation groups with trail cams. Hopefully I could help cut down on the man hours it takes to watch video playback and provide analysis.

Roboflow things I loved:


  • ease of add data and diversity of dataset options provided
  • simplicity of annotating images and all the tools in that view
  • everything about the health check section
  • effortless adding and changing for image preprocessing and augmentation
  • provided code samples for a multitude of languages
  • web app example showing potential nontechnical customer deployment
  • QR code for mobile deployment


Roboflow things to improve:


  • file or video comparison between different versions
  • clearer training and test set from the beginning
    • I held out 30% of my video to use for testing only to realize it was taken from the initial set
  • resampling for an input video
    • I wanted to add more pictures after I got my original sample but didn't want the same pictures again
    • example if video is 60 fps take 15th frame first time and 45th frame second time
  • bug fix where example web app gives different result compared with the 'Visualize' section
  • bug fixes for provided code for 'Try On My Machine'
  • example code for input and output video (easy enough to modify image code but not everyone may know how)
(I was on the free version. I am not sure if any of these are included in the paid version)