I run an automated #moth light and motion-detection #camera each night and now have literally hundreds of thousands of timestamped images to segment and go through identifying insects to try to train an #AI classifier.

Sample image from 23:36 last night here in Aranda, ACT, with #Nacoleia rhoeoalis (male, top-left), #Gastrophora henricaria (orange hindwings), #Ptyoptila matutinella (pink/orange, top-centre) and a locally common but undescribed #Aporoctena species (brown/orange centre).

More on the moth trap here:

https://amt.hobern.net/

Autonomous Moth Trap Project – Stangeia

@dhobern I am fascinated by this project, it’s absolutely amazing Donald!

I’ve started digging into how I can create an object recognition AI myself and was curious if you built the program from scratch? I’m currently looking at Microsoft Power Apps to start with.

Any recommendations?

@dariohudon Very happy to discuss. If you head over to https://amt.hobern.net/, you'll find a lot of what I've done/learned. Most of it derives directly from this paper:

https://doi.org/10.3390/s21020343

I've been writing in Python and making use of the #OpenCV library for image capture and processing. Happy to share my code, although I need to clean some of it up first. I've written a few desktop programs for processing the images, including the ugly UI in the image here.

Autonomous Moth Trap Project – Stangeia

@dariohudon I just realised you were specifically asking about the #AI code.

I haven't started that part yet - focussed first on the manual classification to build a training set. The team behind the paper I referenced include a simple 10-species classifier model in their code repository, but I'm expecting to hunt around myself for the best ideas when I get that far.

@dhobern A few questions if I may as this would be my first project within AI.

1. What would you say is the first step?
2. Could this be a a fun project to do with an 8 y/o or too young?
3. What was your cost? (if you don’t mind my asking)

@dariohudon My first steps were:

1. Build @Raspberry_Pi circuit and box
2. Code to collect #metadata with images
3. Run trap each night
4. Code to segment images, group blobs as tracks
5. Code to annotate tracks with manual identifications

AI recognition is still to come.

If 8yo is interested in nature, the see-what's-in-our-garden aspect should interest.

The electronics is pretty simple and could be a fun activity.

Image segmentation with OpenCV is a candidate for a simple coding project.

@dariohudon Image processing libraries encapsulate most of the complexity for the pipeline and modern ML packages do much of the same, but some coding will be required.

My simpler units cost ~AUD 200-250 for parts. The Logitech camera is expensive but the PiCamera is cost-effective and good and works with the Pi Zero. Timelapse is simpler than motion detection. The housing was one of the more expensive parts. UV light solutions add more cost but could be omitted (but fewer insects).

@dhobern Cheers for the info.

Would it be alright if I hit you up for questions here and there as I setup?

Lastly, what are you doing with the info and what do you consider success within the project itself?

@dariohudon I'm doing this because we are ill-equipped to respond to the #biodiversity crisis. We have reasonable data on birds and some other vertebrate/plant groups, but little on invertebrates, fungi, etc. #TimeSeries data is desperately needed. I *remember* #insects as more abundant in the 1960/70s, but we have little quantification. Only automatable approaches will scale. So my primary goal is to deliver insect time-series data into @gbif in ways that can be compared across time and space.
@dhobern @gbif I appreciate you sharing your reasons. It's a fair concern.
@dariohudon And hit me up whenever you have further questions - I'll soon be looking for tips and guidance on the #AI side so all you find out may be useful to me.
@dhobern I'll share everything I learn my friend :)
@dhobern @Raspberry_Pi You are wonderful! you know that? Well now you do 🙌