Math in the Shell: Machine Learning and the Art of Oyster Seed Counting

By Moumita Roy

October 22, 2024

Oyster Seed Counting

Picture Source: Adobe Stock Images

When we think of mathematics, oyster farming might not be the first thing that comes to mind. However, in the heart of Louisiana, a fascinating project is unfolding that bridges mathematics, biology, and machine learning.

Dr. Nadejda Drenska, an Assistant Professor of Mathematics at Louisiana State University, who typically focuses on applications like self-driving cars, investment strategies, and healthcare, has taken an exciting turn, helping farmers count oyster seeds.

Now, counting oysters is no small feat. Oyster farmers spend countless hours manually sorting and counting tiny oyster seeds in Petri dishes, a task that is both labor-intensive and time-consuming. To streamline this process and support the oyster farming industry, Dr. Drenska and her colleague, Dr. Peter Wolenski, Professor of Mathematics at LSU, along with Sarah Bodenstein from Louisiana Sea Grant Research Lab, decided to harness the power of machine learning. 

"We use Python, ImageJ, and the Stardist library to count the seeds automatically," Dr. Drenska says. "It has been quite a process, but the results are really exciting."

So how exactly does one go about teaching a machine to count oyster seeds?

It starts with pictures. Farmers take photos of Petri dishes filled with oyster seeds, which Dr. Drenska’s team then processes. "Each picture that we have, we create a mask," Dr. Drenska explains. "Then we do machine learning magic.” These annotated images are then fed into the machine learning model, which learns to recognize oyster seeds based on these examples. Eventually, the model becomes capable of counting the seeds on its own, no human crayon-work required.

And the accuracy? "We are hitting around 90-94% accuracy," Dr. Drenska says proudly.

However, since these machine learning programs demand significant processing capacity, they would not work on mobile devices. The team is now focused on developing user-friendly software that farmers can easily use on their computers.

result A GUI for oyster model with the original image (left) and the mask (right).

The project’s real-world applications are what make it so rewarding for Dr. Drenska. "Oyster farmers can use this tool to estimate population density in their containers, which helps them figure out the growth stage and feeding needs of the oysters," she explains. Essentially, the software could save farmers a lot of time and manual effort, allowing them to focus on more pressing tasks. But the project does not stop at oyster seeds. Dr. Drenska is also applying similar machine learning techniques to other biological challenges, such as counting viable and non-viable frog embryos for genetic research.

resultPerformance of the model, including precision, recall, accuracy and F1 score.
"We are hitting around 90-94% accuracy," Dr. Drenska says proudly.

This project is one of many at LSU’s Math Consultation Clinic, where students apply their mathematical skills to real-world problems. The clinic gives students the chance to work alongside faculty on impactful, applied math projects. Typically, students who enroll in this course are majoring or minoring in mathematics or computer science. They are expected to have some prior experience with computer applications to tackle the challenges effectively.

One of the most exciting parts of the project for Dr. Drenska is watching her students thrive, as they are one of the main driving forces behind this initiative.

"Students are the ones who are taking ownership and moving this project forward. It is motivating and engaging for them to see their work applied to real-world problems."

Over the summer, about 20 students worked across three different projects, including the oyster seed counting project. Dr. Drenska couldn’t be prouder. "It is a great learning experience for them," she notes, "and they are making real contributions."