AI Transforms Bug Monitoring – A Case Study

Wed, 6, March, 2024 by Food from Thought

Bugs have shorter lifespans than most creatures on our planet. As a result, changes in the number, distribution and species of bugs can provide early warning signals of changing health and biodiversity in our ecosystems.

Until now, gathering this critical information on bug diversity and abundance has been a daunting task that involved setting traps, sorting the bugs by hand, and identifying them under a microscope. The required time, expertise, and resources limited the scope and scale of biodiversity research and conservation. However, this is changing thanks to research at the University of Guelph, funded in part by Food from Thought.

Dr. John Fryxell and his lab in the Department of Integrative Biology worked in collaboration with Dr. Graham Taylor at the School of Engineering and Dr. Stefan Kremer from the School of Computer Science to develop a novel approach that used artificial intelligence (AI) to identify bugs rapidly and accurately from photos. The new AI algorithm, called BugShot AI, can process in just a couple of hours a sample that would take up to a year with traditional identification methods.

While BugShot AI is incredibly time efficient, Fryxell emphasized that developing an effective AI requires a significant investment of time to train, test, and validate it. “Somebody has to guide the machine… For the identification work, four different undergraduates put in a huge amount of time sorting tens of thousands of samples under dissecting scopes,” explained Fryxell.

The AI side of the project was handled by Dr. Stefan Schneider while a postdoc at The Fryxell Lab and Taylor’s Machine Learning Research Group. Schneider used image datasets of the sorted bugs to train several deep learning models to recognize patterns in the images and classify them into functional groups that loosely follow the orders within the phylum Arthropoda, such as ants, beetles, spiders, or moths. Once sorted into groups, the AI model estimates the biomass by calculating the average pixel weight of the bugs.

“We currently live in a vacuum where we are dimly aware that we have these big effects, but we can’t monitor them routinely.”   – Dr. John Fryxell

Since then, Taylor has used BugShot AI to develop algorithms that can handle more precise tasks with support from NSERC, the Canada Research Chairs Program, the Vector Institute and Nvidia. Taylor explains, “BugShot was a starting point. Then we got the human experts to clean up the [BugShot data], and now we’re using that as really high-quality training data to build machine learning models to do classification at the family level.” They now have a model that can accurately identify specimens from the order Diptera (flies) into the appropriate taxonomic family, and he hopes to quickly expand it. They are also pairing the image data with DNA barcoding to improve the accuracy of the identification.

This improved algorithm is currently integrated into the pipeline of analysis at the Centre for Biodiversity Genomics at the University of Guelph. The visual sorting provided by the AI are one step in a global project called LIFEPLAN, which aims to monitor biodiversity around the world.

While development and adoption of these AI tools are still in the early stages, BugShot AI and its successors demonstrate the potential impact of AI for biodiversity research and beyond. As Fryxell observed, “we currently live in a vacuum where we are dimly aware that we have these big effects, but we can’t monitor them routinely. If we can sample bugs in a cheap and readily processed way all over the globe, we can pair biodiversity information with other data and build a sentinel system to track our impact and identify what factors make that impact better or worse.”

Read more in the paper published in Methods in Ecology and Evolution or The Logic’s recent article.