Farming has changed.
Modern agricultural producers no longer rely on almanacs and hunches to manage their businesses. For decades, hard data and actionable insights have been vital for farmers to remain competitive in a changing industry.
But there are bottlenecks and barriers to getting that crucial data. It can be especially difficult for agricultural producers whose expertise is in growing, not data analysis. Now, AI is changing the way that farmers understand their fields and their crops, unlocking new insights that can reduce manual effort while allowing farmers to optimize harvesting, use resources more efficiently, and ultimately increase crop yields.
Over the last several years, Amii has partnered with Saskatoon-based Croptimistic Technology Inc. to explore how machine learning can be used in the agricultural sector. Together, they built two tools that showcase the power AI has in precision agriculture.
“Amii amplified our ability, really. That's what businesses need,” says Cory Willness, Croptimistic CEO.
“You need someone that can train you on the fundamentals of what you need to execute on."
Rooted in Data
Croptimistic is best known for creating SWAT Maps - specialized maps that contain detailed information about the water, soil conditions, and topography of a given field. That information can help a farmer know best how to seed, water, and fertilize their land, ensuring the best harvest and reducing wasted resources and time. Willness says that kind of insight is invaluable: their customers report it is common to see a 6:1 return on investment when they start using SWAT maps.
After creating this powerful agricultural tool, Croptimistic wanted to go deeper and discover how AI could enhance the services they were offering to their clients. They approached Amii with an initial project to explore if AI could help with crop identification.
The partnership took advantage of the strengths of both sides. Cropstomistic came with a deep understanding of the agricultural industry and imaging technology, the challenges of the sector, and what kinds of insights are most helpful for farmers. On the other hand, Amii’s experience in applying leading-edge machine learning to real-world problems helped make the best use of the data that Croptimistic was collecting.
"We could get a huge boost in terms of our abilities to push the needle on some of our projects because we had access to expert knowledge in that domain that we didn't have in-house, andthe ability to tackle high-risk, high-reward projects. We probably wouldn't have tackled that without having this level of support available," says Philip Harder, Croptimistic’s Vice President of Data Science.
Amii amplified our ability, really. That's what businesses need. You need someone that can train you on the fundamentals of what you need to execute on.
Cory Willness
Croptimistic CEO

From Plants to Pixels
Accurately counting rows of planted crops and being sure of what is growing there is important. That information allows an agricultural producer to forecast what their yield will be, and ultimately how much product they will have to sell, as well as how much fertilizer and other resources will be needed. Traditionally, it is done by manually counting a section of the field and extrapolating that out to the entire crop: a time-consuming and imprecise approach.
Taking images of the crops could be useful for counting, but that comes with its own challenges: crops grow closely enough that plants can be covered up by other plants, including weeds. Croptimistic approached Amii to see if computer vision and machine intelligence could be used to decipher images and automate the process of crop counting, specifically early season cereal crops, such as wheat, barley, rye, and oats.
The team’s first big hurdle to building a model was a limited amount of data. They had a dataset of only 54 images of cereal grains, which also tend to have narrow-leafs . And those images were taken at the angle of a person standing in a field, very different from the goal, which was to have the crops counted by cameras mounted on spraying machines, which would have a top-down view while passing over the rows.
To address this discrepancy, the Amii and Croptimistic team developed a specialized image pipeline, which would transform the images to appear more like what could be expected by a sprayer-mounted camera. Then the model would apply a segmentation mask, which went through the image pixel by pixel to isolate the crop plants from everything else in the picture, like weeds or the ground.
Instead of trying to isolate and count individual plants, which could be hidden by others in the row, they looked at the total number of green pixels in the image to get an idea of how much plant matter was visible. Using that total green count, they could then train an AI model to estimate the final crop count for that part of the field.
Now, instead of having to manually count and make estimates, the model could turn noisy images of narrow-leaf crops into accurate insights for the agricultural producer. Using the image pipeline they built to process the images allows for flexibility, making the model more effective for working on different equipment and terrain.
“We've taken something out of the lab and put it into the real world, giving more actionable data to farmers. That's the type of project that really excites us,” says Dave Staszak, Amii’s Lead Machine Scientist, who worked on the project.

Mapping the Way Forward
Croptimistic was pleased with the results. So much so that they partnered with Amii for another, perhaps more difficult project: ranking the suitability of the company’s specialized SWAT maps. When analyzing a particular piece of land, it isn’t just one map that is generated, but several candidates with slight differences. Once created, they need to be ranked to find which one is the most relevant for that particular scenario. That’s usually done by an expert agronomist, and there is a lot of subjectivity and expert opinion involved in choosing the most relevant SWAT map.
Croptimistic wanted to see if there was a way to automate that process. During the year-long project, the company worked with Amii machine learning scientists to build a sophisticated learning-to-rank model that would sift through the potential SWAT maps and find the most relevant options. Using years of satellite data, weather information, and other criteria, they were able to build a system that evaluated entire groups of potential SWAT maps simultaneously, scoring them against each other.
To finalize the selection process, the system sorted the SWAT maps based on the predicted scores they would get from an expert agronomist, creating a short list of the most promising candidates. The final model had high accuracy in selecting similar SWAT maps to what human experts picked, helping eliminate less-useful SWAT maps and streamlining the selection process.
While the project itself meant significant benefits for Croptimistic and its customers, Willness says the long-term changes to the company might be the bigger benefit. Amii’s unique partnership structure meant that the team was able to hire the machine learning resident who works on the crop ID project, bringing them on to their team and increasing their own capacity for future AI projects.
"Let's just say it became part of everything we did, and they doubled our capacity to build software in the last six months. And then in the last two months, it doubled again," Willness says.
