Skip to content
Search

Ontario Grain Farmer Magazine is the flagship publication of Grain Farmers of Ontario and a source of information for our province’s grain farmers. 

Artificial intelligence on the farm

Research advances new technology

The ways in which AI (artificial intelligence) is providing concrete help to grain farmers are growing. AI specializes in taking large amounts of data and presenting useful conclusions. For example, AI is being used to analyze a wide range of datasets to provide more accurate, longer-term weather forecasts.

Advertisement

Across various ‘big ag’ platforms, it’s crunching numbers from soil tests and past yields, comparing them between fields, among varieties, and more, resulting in better decisions for the next year.

But AI can also take new visual data and analyze it on the fly to help farmers (and breeders and researchers in some cases) in exciting new ways. That’s the current angle in the work of Riley McConachie, a PhD student with Dr. Helen Booker in the Department of Plant Agriculture at the University of Guelph.

McConachie recently completed his master’s degree, where he successfully proved that AI can accurately count the number of wheat heads in an image. He also trained the AI to produce a Fusarium head blight (FHB) severity index. The associated app he created, called WheatScanR, was released in August for free download. McConachie has already won numerous awards for his hard work, but he’s not stopping there. Now, in his PhD, he is retraining the AI to improve it, working to add a yield prediction capability, and more.

The scope of the research includes using images taken by grain farmers who are part of the Great Lakes Yield Enhancement Network (YEN). YEN participants have had to do head counts manually, like researchers and breeders do, which takes a long time and isn’t highly accurate (results can vary from person to person). With McConachie’s work, farmers will be able to simply take pictures, and the app will quickly and objectively count them.

LEARNING TO COUNT

To “train” any AI to do any task, in this case, counting how many of a given item are present in an image, you use the same steps you’d use to train a person. First, the AI must recognize the item of interest.

“We put boxes around wheat heads in an image to single them out, and it learns that these are wheat heads through identifying their shape, features and textures,” McConachie explains. “About 70 per cent of total annotated data is devoted to that task, building a solid foundation. Then the AI uses another roughly 20 per cent of the data to apply what it learned, to validation. It will look at new images, do a head count for each image and determine how accurate that is by comparing its results to the actual results, where the number of wheat heads in the same images has been tagged by me or someone else. It will then improve its own accuracy as needed by going back to the images where accuracy was not high.”

The other 10 per cent of data is used for “true testing.” This occurs after training is essentially complete, and the AI is presented with new images with no results to compare to. (And in case you’re wondering, this AI is available free to anyone from YOLO. Processing time for this project is purchased from a remote server through a plan, as that’s much more economical than a university installing an appropriate server.)

At this point, farmers can use WheatScanR to obtain a head count per area pictured, and they can also use those results to make their own yield predictions (using either existing images or new ones, all of which remain private). However, McConachie is developing the AI’s capability to do early yield estimation of its own. “Of course, there are many other things like weather and disease that can affect yield, so our yield estimator will be simple,” he explains. “But we actually need to keep it simple for it to work well. I think we’ll use three variables, the number of heads present, the number of kernels on the heads, and the historical test weight for the variety.”

However, as mentioned, WheatScanR also already has an instantaneous measure of FHB severity, where the AI counts infected heads versus non-infected heads in the provided images. Yes, this severity index could also be used in the yield estimation, says McConachie, but you’d want to make sure it was very accurate before you’d integrate it with a yield estimation tool that’s already working well.

On the farm, FHB severity readings from various fields could be used by grain farmers to do things like differential harvesting, where they keep more-diseased grain separate from cleaner grain.

“You can also get a sense of the areas that are most affected over time, and apply less nitrogen to those areas to decrease in-crop humidity, or spray more in those areas,” says McConachie. “For researchers, having this in an app means that FHB estimation will be much faster and more accurate. This task has always been carried out manually by students. And for breeders, a faster and more accurate way to measure FHB severity will also be more efficient in breeding programs, as it will yield estimation in time.”

THE POTENTIAL OF AI

McConachie sees AI as an extremely useful tool, but also notes its limitations. That is, the YOLO AI serves as the basis for the app, but McConachie is also using other AI platforms to perform related tasks in his research workflow—albeit only for certain tasks. “There’s part of my thesis, for example, where AI could be used, but it would take a long time to do things that way,” he notes. “You’d have to do a lot of work to ensure the result would be reliable. So it’s not always the best approach, and with that part of my research, I’m doing something simpler that I’m pretty sure will work well.”

When asked about AI in farming, McConachie believes it will be increasingly useful. For example, the existing platforms for variable automated spraying of crop protection products (based on sensors that detect weed concentrations or disease severity) will get much better. At the same time, McConachie observes that these systems need to be more rugged and that they are currently very expensive and can be quite slow to fix sensors that have stopped working.

Regarding his own AI work, he’s very excited that it’s transferable to other crops and diseases, but this won’t come quickly.

“It will take a number of years before we have systems to detect all diseases in all crops,” McConachie says. “It’s very difficult to detect and distinguish leaf diseases, and root diseases are a whole other area. And with estimating the yield impact of disease, the severity and incidence for some pathogens correlates well but others don’t. There are other factors in play, such as when the disease took hold, upcoming weather and so on.”

But for now, McConachie is very excited that WheatScanR will help a lot of growers in 2026 and beyond. “I really hope a lot of people use it next year,” he says. “Word is spreading. I can’t wait to update it, but it’s pretty good as is.”

Riley McConachie was a 2024 recipient of the Grain Farmers of Ontario Legacy Scholarship.

In this issue: