
Team Develops AI Tool to Measure Real-Time Crop Health from the Field
The Leaf Spectrometry App Predicts Nutrition and Stressors
Imagine walking into a field, plucking a leaf off a grapevine, scanning it and knowing within seconds if the plant is healthy, needs fertilizer or is showing signs of stress.
A team from the Department of Biological and Agricultural Engineering at University of California, Davis, has done just that.
Meet the Leaf Monitor, a mobile tool paired with a handheld spectrometer backed by artificial intelligence and predictive modeling that could revolutionize how farmers monitor and manage crop decisions by providing real-time nutrition and trait information in the field.
“Having this information is very valuable for the farmers,” said Alireza Pourreza, an associate professor of Cooperative Extension at UC Davis who is director of the Digital Agriculture Laboratory. “Right now, in five seconds, they can have a sense of how much nutrition they have in a leaf.”
Development of the AI model was funded by the U.S. Department of Agriculture’s National Institute of Food and Agriculture’s HiRes Vineyard Nutrition multistate project and its Animal and Plant Health Inspection Service, as well as the California Table Grape Commission.
Maha Afifi, director of viticulture research at the California Table Grape Commission, said the tool could be a game changer for the table grape industry if it leads to faster decision-making when it comes to fertilizer use. The right amount typically leads to healthier vines that produce more grapes with optimal size, weight and color.
“The evaluation of vine nutrient status is one of our top priorities,” Afifi said. “At the same time, exploring new technology tools like this project is a high priority for us because they will be important to the future of the table grape industry.”

Field Testing
Ph.D. student Parastoo Farajpoor, who is running the project, helped demonstrate how the Leaf Monitor tool works on a recent morning in a Bullseye Farms almond orchard in Davis.
She plucked a leaf from an almond tree, placed it between a black panel and a light source on a handheld spectrometer that can detect light beyond what the human eye can see and scanned the sample. Results came back detailing 10 nutrition indicators, including nitrogen, potassium, and phosphorus, as well as six leaf biochemical and structural traits like chlorophyll, water content, leaf structure and density.
“Nutrient deficiencies in plants often go unnoticed until late in the season, by which point the damage is already irreversible,” Farajpoor said. “This is why early detection is essential. Spectrometry provides a rapid and reliable way to identify these deficiencies before visible symptoms appear.”
Bullseye grows walnuts, pistachios, tomatoes, corn, wheat, rice and sunflowers in Yolo and Solano counties and Irrigation Manager Geoff Klein said the tool could help save money and improve yields.
Farmers typically take leaf samples, dry them, grind them up and send the samples off to a lab for testing, which can take up to two weeks to return results. Bullseye samples leaf tissues about three times a year.
“Right now, it doesn’t really make sense to go out and take tissues in every single corner just because it’s expensive,” Klein said. “It’d be really cool if I could just walk out there and test a couple of different places.”
The Leaf Monitor tool helps farmers tailor management decisions to specific areas rather than an entire field. Using fertilizer more precisely based on real-time data can prevent overuse and nitrogen runoff, a financial and environmental challenge that many growers face.
“I feel like there’s a lot of times we do need to put less [fertilizer] on, where we end up putting more, because that’s what the nitrogen removal formula says,” Klein said. “But with this app we can use less because we know the actual conditions at the time. I think it opens a lot of doors in terms of getting data back in real time and also utilizing the level of control we have with the data.”
The app can also aggregate the scans and map out spatial patterns over a large area. “What we know is every field has variability that is not necessarily visible to the farmer’s eye,” Pourreza said.

Measuring a broad spectrum
The Leaf Monitor tool uses the spectrometer to measure leaf reflectance beyond the range of light visible to the human eye, which is limited to wavelengths between 400 and 700 nanometers. This tool measures light between 400 to 2500 nanometers.
“Each part of this electromagnetic spectrum is sensitive to different attributes of plants,” Pourreza said.
Once a leaf is scanned, its spectral data is uploaded to a cloud-based machine learning system designed to predict leaf traits and nutrient content. This algorithm was developed and trained by the Digital Agriculture Laboratory over a five-year period using a dataset of thousands of leaf samples collected from California’s specialty crops, primarily grapevines and almonds.
Each sample was chemically analyzed to determine nutrient levels and structural leaf traits, providing the data needed to build an accurate prediction model.
“We introduced a wide range of diversity so the model can see many different scenarios that could happen in California for these crops,” Pourreza said.
The prototype Leaf Monitor tool is free and part of a set tools in a Digital Ag Lab App that can be downloaded on the Digital Agriculture Laboratory website. A web-based version of the tool will follow while the team continues to feed new data into the algorithm to refine the predictions. Its accuracy varies depending on the specific leaf trait. On average, it achieves about 65% accuracy across all traits, with predictions for certain nutrients, such as nitrogen and phosphorus, performing better than the overall average. Users will need to pair it with a spectrometer.
“We need to produce more food while using less resources so we need to have some kind of monitoring system to give us precise and accurate feedback on our management practice,” Pourreza said. “This technology is growing very fast.”
Media Resources
- Alireza Pourreza, Department of Biological and Agricultural Engineering, apourreza@ucdavis.edu
- Parastoo Farajpoor, Department of Biological and Agricultural Engineering, pfarajpoor@ucdavis.edu
- Emily C. Dooley, College of Agricultural and Environmental Sciences, ecdooley@ucdavis.edu