Chico State Students Fly Drones to Count Walnuts

Chico State Professor Josh Miranda and five mechatronic and mechanical engineering students piloted a camera-mounted drone over the University Farm one recent sunny summer afternoon. The mission: count walnuts. As a turkey vulture looped overhead, the drone offered a literal bird’s-eye view of one of the state’s most valuable commercial crops.
“I think there’s a possibility that we could use this to make better predictions of walnut production throughout the state,” Miranda said.
Walnut farmers could use the help. By the time harvest arrives in September and October, California growers have already made months of decisions about water, fertilizer, labor, and marketing—often without knowing exactly how many nuts are hanging in the trees.
Traditional counting is done using observation, historical knowledge, representative sampling, and statistical modeling.
“Guesswork,” said Brian Mori of Crain Walnut Shelling, based in Los Molinos, about 25 miles north of Chico.
That uncertainty is costly. Walnuts from California account for 99 percent of all walnuts grown in the United States and 38 percent of world production. That can be more than 700,000 tons of walnuts a year. For an industry of that scale, even small forecasting misses can ripple through markets.

Undercounts mean a higher supply of walnuts than anticipated, decreasing profits for growers; overcounts can lead to supply shortfalls and higher prices for consumers.
“Knowing the size of the crop is important for go-to-market strategies,” said Robert Verloop, executive director and chief executive officer of the California Walnut Board, which is partnering with Chico State on the drone project. Recent counts, he noted, have been off as much as 12 percent. He’d like it if estimates were within 5 percent.
That challenge has become an opportunity for Chico State students.
Led by Miranda, lecturer in the Mechanical and Mechatronic Engineering and Advanced Manufacturing Department, Chico State students are using drones, aerial imagery, and artificial intelligence to estimate walnut yields before harvest. The drones fly about 60 to 70 feet above orchards, capturing thousands of images. Students have developed machine-learning software to scan those images and identify likely walnuts.
The walnut-counting drone project, with tests on over 500 acres across the North State, is funded by a three-year, California State University Agricultural Research Institute grant.
“This is a meeting of the minds between engineering, AI, geography, agriculture and traditional farming knowledge,” Miranda said. “Our students did all the machine learning, computer vision part of it. We’re not telling growers they’re doing it wrong. But this can help.”
For Kalpit Sharma, a computer science master’s student, the project became more than an assignment. It became his thesis and a turning point.
Sharma helped build the project’s machine-learning model, researching computer vision methods, creating synthetic walnut data, testing designs, and helping develop a system that could detect walnuts in drone images.
“Walnuts are green in color when they are on the trees. And so are the canopies,” Sharma said. “It’s very difficult for us as humans to identify them as walnuts in those images. So, it was very difficult for the computer to do that as well.”
The breakthrough came through synthetic data. Instead of manually labeling thousands of walnuts, Sharma’s team started with about 50 annotated images, cropped out walnuts, and placed them onto canopy backgrounds. From those 50 images, they could generate roughly 20,000 training images.
“I was most proud of the synthetic part of it, because that is what the world is trying to explore right now,” Sharma said. “It ignited the researcher inside me.”
Computer science professor Abbas Attarwala, who partnered with Miranda on the software side of this project, said that is exactly the point. He praised Sharma and fellow graduate student Tirth Shah’s strong computer science and math skills. The walnut project, he said, gave them something more powerful than a classroom exercise.
“These are not problems that are created from a textbook or a toy problem,” Attarwala said. “Let’s address a real problem that can help a community.”
That real-world connection is critical. Students are building models and learning to fly drones, working with commercial partners, processing massive image datasets, and solving problems across agriculture, engineering, geography, and computer science.
Some of the students, like Chase Klauschie, a mechanical engineering major in his junior year, are using the project to earn a commercial drone pilot license from the Federal Aviation Administration.
“I’m interested in doing something that helps people and being outdoors,” he said of his career aspirations. “And I think agriculture is a really good place to do that.”
In an era when higher education is placing a high priority on job placement, this AI-enabled drone project can lift job prospects for students.
“My job is to find cool projects for them to work on, get them paid to work on the projects, and get experience they can take into their career,” Miranda said.
The grower need is urgent. Traditional crop estimates rely on counts from the ground. But walnuts often grow high in the canopy or in places that are hard to see.
Mori, director of field services at Crain, one of the largest growers in California and is working with Miranda’s team, said accuracy matters because walnuts have a short marketing window.
“One of the pain points has been the lack of accuracy in estimates around the state,” Mori said. “That has huge ramifications” when it comes to market valuation.
Mori said Chico State’s technology is promising, but it must eventually reveal more than visible nut counts. The next step needs to include data about crop quality, weather, heat, water availability, crop differences, and whether nuts ultimately become usable kernels.
Miranda agreed the work is still evolving. Shadows can hide walnuts from the model. Wind, rain, and wildfire smoke can interfere with flights and data capture. The team’s long-term goal is to give growers useful information within about a week of flying an orchard, including heat maps showing where nuts are concentrated.
“If they know where the nuts are, then maybe they can prioritize where those inputs (such as water and fertilizer) go,” Miranda said.
For students like Sharma, the project shows what happens when University research meets regional need.
“That was a completely undiscovered domain for me, and it really intrigued me,” he said. “Research is all about experiments. You have to try everything around, otherwise you will never know what might work.”
In other words, Chico State students are not just preparing for the future of work. They are building it—one walnut image at a time.
