Capturing photos of moths in Australia
Donald Hobern lives in Australia and describes himself as an “amateur naturalist with particular interest in moths”. He has created an automated moth trap with a machine learning identification model, specially designed to study the moths of Canberra, Australia. The project is based on a design by Kim Bjerge and their colleagues, which you can read about in the journal Sensors.
- Raspberry Pi 4 (controls the lights and webcam with motion detection software)
- 15W actinic tube running off 12V DC (to attract moths)
- A3 LED light table (for the moths to sit on)
- Logitech BRIO 4K Ultra HD webcam
- LED ring light (to illuminate the light table so moths are lured to sit on it)
- A circuit that allows the Raspberry Pi to turn the moth light and the ring light on and off at scheduled times
How does it work?
In the setup that Bjerge and their team created, which inspired this build, the Raspberry Pi runs Python software to turn the lights on and off and to run motion detection and imaging software. The lights are connected directly to the Raspberry Pi’s GPIO.
The images collected by the system are then processed using the Python Moth Classification and Counting software developed by Bjerge. The software detects “blobs” in the images, tracks the movement of the same blob between images, and uses a Convolutional Neural Network model to classify the blobs based on a training set of images. “Blobs” is a term I’ve borrowed from the journal Sensors. I am 89% sure that it means “potentially some cool moths we want to photograph”.
Donald has set up his version of the trap to come on automatically at 6pm and turn off around 5am. He controls his Raspberry Pi over a PuTTY connection and accesses images via FTP using the trusty FileZilla. Future upgrades will include automating the image transfer process so that he can more easily look through them every day.
Donald very brilliantly finished his build, despite not having attempted any electronics since he was a young child. Go Donald. However, he crossed that finish line in the winter time, when there are relatively few insects hanging around due to the freezing temperatures. Donald, undeterred, has nonetheless managed to capture a few good images and has uploaded some examples to iNaturalist. He hopes to capture “many thousands” of images when the warmer months roll around, and has left the camera up for now acting as a general nature camera trap. I Googled “Most dangerous animals in Canberra” and there are like five types of snake that could do you serious harm. Wildlife camera traps in Australia must be way more interesting than ours in general. We just get badgers and foxes really. Cool in their own way and all, but not deadly Tiger Snake cool.
Jump to the comment form
Thanks for highlighting my project – don’t panic about Australian wildlife. It has a bad reputation, but snakes are shy, most other dangerous animals are sadly rare and hard to find, and all over the world, more people die from horses, dogs and bees than from our animals.
Raspberry Pi Staff Ashley Whittaker — post author
We *know* all this to be true but our logic never overcomes our irrational fear. I can’t even *look* at pictures of sharks in books, that’s how out of hand my irrationality is?!