An AI-Free Way To Catch Wildlife On Camera

Judging by the over-representation of the term “AI” in our news feeds these days, we’re clearly in the exponential phase of the artificial intelligence hype cycle, and very nearly at the dreaded “Peak of Inflated Expectations.” It seems like there’s nothing that AI can’t do, and nowhere that its principles can’t be applied to virtuous — and profitable — effect.

We don’t deny that AI has massive potential, but we strongly suspect that there will soon come a day when eyes will roll and stomachs will turn at yet another AI application that could have been addressed with something easier. An example of the simpler approach can be seen in this non-AI wildlife photo trap, cobbled together by [Sebastian] to capture pictures of some camera-shy squirrels. Rather than train an AI with gigabytes of squirrel images, he instead relies on his old Sony Alpha camera, which has a built-in WiFi. A Python script connects to the camera, which is trained on a feeder box and set to a very narrow depth of field. That makes a good percentage of the scene out of focus until a squirrel or other animal comes along looking for treats. The script detects the increased area of the scene that is now in-focus with a Laplace operator in OpenCV, and triggers the camera shutter. [Sebastian] ended up with some wonderful shots of the shy squirrels using this scheme; the video below describes the setup in more detail.

It’s not the first time we’ve seen Laplace transforms used to gauge image sharpness, of course, but we really like the approach [Sebastian] took here for its simplicity. The squirrels are cute too.

14 thoughts on “An AI-Free Way To Catch Wildlife On Camera

  1. i like the trick of using the narrow focus. i have a camera in my basement that triggers on change…it is great to surveil the rodent population down there. made some great videos of rats stealing traps without getting killed, for example. but i have to be careful about what i leave in frame because it will take images all afternoon long if it is able to see the sun spot from the window moving across the floor, or worse yet flickering from clouds. i wouldn’t have thought this simplistic method would work at all outdoors but using depth of focus to limit it is a good trick!

  2. “we strongly suspect that there will soon come a day when eyes will roll and stomachs will turn at yet another AI application”

    That day came some time ago.

      1. I did my Master’s in AI (“Intelligent Knowledge-based Systems” if you want to date it) a few AI seasons ago, and what was most definitely AI back then, has now been subsumed into modern computing techniques.

        And that cycle will continue, until the Singularity, and we all becomes slaves of the Machine.

        (OK the last bit was tongue in cheek…. or WAS it??? Dan dan deerrrrrrrrr!)

  3. Now, for some real fun, make the platform out of metal, add a metal top to the glass where the animal is grabbing…connect through a switch to a fence charger….and watch the acrobatics begin!

    Bonus: you won’t need to buy birdseed as often

  4. Uhm … i´ve done this simple thing 20yrs ago with a IR-Detector & OpAmp.

    Today i want do detect a specific sort of Doves to prevent them from steal the Sqirrels food with a Water-Gun :-)
    Thats what AI is made for ;-)

  5. Can’t find your stash off 555s to make a whizbang squirrel detector? You could try CHDK Motion detection. It could have been designed for this very application… Just saying.
    By the way did someone say SQUIRREL!!!

Leave a Reply to SomunCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.