Environmental author Wendell Berry might shudder at this comparison, but farmers are like data scientists. To make decisions, they ferret out meaning from a sea of data.

That data just happens to be related to environmental conditions like temperature, rainfall, salinity, nitrogen, pests, commodity prices, and other variables.

What that data often shows is trouble: increasingly costly or scarce water supplies, new and more voracious pests, herbicide-resistant weeds, and extreme weather. All of this can result in lower farm yields and higher costs.

At the same time, that trouble has also created an entry point for entrepreneurs and venture capitalists. Between 2012 and 2015, investments in agriculture technology, or agtech, grew by 80 percent.

In recent years, agtech startups have built products focused on saving water, micromanaging fertilizer, and building better sensors to make data collection cheaper. But to find meaning from data and use it to make better decisions, artificial intelligence has begun to play a vital role in agtech.

Less Is More

Farmers face a gargantuan task: trying to feed a world of 7 billion, which will swell to 9 or 10 billion by midcentury. At the same time, due to factors like deforestation, transportation, chemical reliance, and methane generation, agriculture is a major contributor to climate change.

This raises the question: Can agtech help farmers be more productive while also righting conventional agriculture’s wrongs, such as heavy dependence on chemicals, soil depletion, water overuse, and contamination? Proponents of precision agriculture — which refers to the application of information technology to make farming more efficient — think it can.

Count agriculture giant John Deere among those proponents. This month, the farm equipment manufacturer announced that it plans to acquire Sunnyvale, California–based startup Blue River Technology for $305 million. Blue River’s See and Spray software marries computer vision, machine learning, and robotics.

The startup’s tech runs on cameras mounted to farm equipment and identifies individual weeds as the machines move over cropland. By synching with herbicide spraying equipment, See and Spray allows farmers to spray only the individual plants they want to kill, rather than using conventional herbicide applications where the chemical is sprayed across the entire crop.

The purchase is a smart play for John Deere.

It and other makers of farm equipment have already turned tractors into mobile data centers, outfitting the cabs with advanced sensors, satellite navigation systems, and cameras. And all these tools are designed to increase crop yield and reduce waste. Using machine learning to quickly and reliably decipher a weed from a crop and linking that to an autonomous sprayer is a logical extension of all that hardware.

Rooting Out Disease

Monsanto is another ag giant interested in using AI to make better sense of environmental data.

In 2013, Monsanto acquired the Climate Corporation for $1 billion. At the time of acquisition, the startup had developed a product that used data science to analyze hyperlocal weather data and other variables, such as soil health, to advise farmers on how to ensure high yields. Today, the Climate Corporation relies on AI in ways similar to how Blue River uses it.

With its FieldView software, the Climate Corporation uses deep learning techniques to analyze images of plants in order to identify diseases in corn. Think of it like facial recognition for bad-actor plants that could ruin a whole crop.

“It’s often difficult to correctly identify a disease. Even expert pathologists get it wrong sometimes,” says Steven Ward, the company’s director of geospatial sciences. Ward says that by tracking disease across cropland, farmers can make better management decisions, like whether to use a certain chemical.

Cargo Container to Table

Far from the verdant fields of Nebraska or Iowa, farms have been proliferating in cities. Sure, rooftop gardens have been sprouting for years, but the newer trend is how ag is taking root in parking lots and old factories, and it is heavily reliant on data science.

From seed to germination to harvest, the lives of the leafy greens and herbs being cranked out by startups including Bowery, Freight Farms, Plenty, and AeroFarms are micromanaged and nurtured using LED light, water, and fertilizers. Data is collected at every step of the process and is used to tweak lighting, nutrient levels, and temperature for the plants inside the facilities, which are grown through hydroponics (or aeroponics, as AeroFarms calls its process, because it mists rather than submerges roots).

Growing indoors means these startups use a fraction of the land and none of the pesticides that conventional farming requires. Water and fertilizers are the key resources, but water not consumed by the plants or lost to evaporation can be recycled.

This farming approach does require energy, of course, but generally far less carbon is emitted from transporting these crops. Some restaurants have even placed Freight Farms units, which are upcycled cargo containers, right next to their facilities.

Growing indoors allows companies to significantly increase the number of growing cycles per year for a given crop. This also means they collect far more data over the course of a year.

“It’s a massive optimization problem,” says Matt Barnard, founder and CEO of Plenty. “That’s why we need machine learning.”

Barnard says the company uses machine learning and computer vision to analyze the data it collects, improve characteristics of the produce, and reach goals around operational efficiency.

The Hard Stuff

When it comes to scaling AI in farming, there are some significant hurdles. For one, in conventional (outdoor) farms, it is often only larger farming operations that have the capital and tolerance for risk to invest in and test new agtech solutions. “Generally, small and midsize farmers are not very comfortable with digital farming,” says Shriram Ramanaghan, who heads the big data analytics practice at research firm Lux Research.

On the technology side, it can be hard to reap profits along with all that data. Lux Research recently surveyed 123 agtech companies and found that 70 percent have yet to reach profitability.

Cleveland Justis, executive director of the Institute for Innovation and Entrepreneurship at University of California, Davis, says that three to five years ago, during the height of Silicon Valley’s excitement over agtech, “we were getting calls all the time from people asking, ‘How can we apply technology to agriculture?’”

Justis admits that sometimes the pitches he heard sounded like solutions looking for problems. Still, he says that by no means is agtech all vaporware: “There are great applications, and you hear from farmers when they really work.”

But the Climate Corporation’s Steven Ward notes that technological solutions only work on fertile ground. “Any feature, AI or not, is a fantastic utility, but it has to be used in the context of the farmer’s institutional knowledge. We will never be able to replace the knowledge of fourth- or fifth-generation farmers.”