Wine growers have a neat, if unusual, trick for making more flavorful wine—don’t water the vines. Let the vines go dry right before harvest, and they will yield smaller grapes with more skin and less juice. Smaller grapes produce wine with a deeper color and more complex flavor.

Trinchero Family Estates in Napa Valley, California wanted to make sure it was watering its grapes just the right amount, so they worked with Ceres Imaging to map their fields. Ceres used fixed-wing aircrafts to capture color, thermal, and infrared images of the vineyard, and they used artificial intelligence to analyze those images to see if the wine producer was overwatering its grapes.

It turns out that, in parts of the vineyard, Trinchero was. Their wine experts found that areas that got too much water had also produced slightly less flavorful grapes. The company now uses the imaging technology to make sure it isn’t watering their vines too much or too little, and to find leaks in the irrigation system.

This technology represents the cutting-edge of agriculture. High-tech firms like Ceres, Prospera, Farmers Edge, and the Climate Corporation are using artificial intelligence to help famers decide when to plant, water, spray, and harvest their crops. As climate change worsens rainstorms in the Midwest and drought in California, the technology could also help growers navigate more severe and volatile weather.

“Today’s irrigation delivers the same amount of water to all the plants in a field, even though each plant will retain water differently,” said Daniel Koppel, CEO of Prospera, which, among other things, analyzes images taken by cameras mounted on movable sprinkler systems. “Also, the amount of water a plant needs depends on the age and size of the plant, whether it has fruit on it or just flowers, etc.”

Firms can use thermal imaging, for example, to see if crops are getting enough water. Thirsty crops tend to be a little warmer than others. That’s because, normally, plants release some of the water they soak through their roots through tiny pores on the underside of their leaves. When that water evaporates, it cools off the plant, just as sweating cools off humans. Thirsty plants, however, close off these pores to avoid losing water, which leaves them a little warmer. If farmers can identify precisely which plants are parched, they only need to irrigate those crops, which helps them save water, which will become harder to come by as climate change fuels longer and more severe droughts.

Prospera Firms can use thermal imaging, for example, to see if crops are getting enough water.

Firms are collecting images from cameras mounted to sprinkler systems, drones, planes, and satellites, and they are using computers to analyze those images to identify which crops are besieged by caterpillars, surrounded by weeds, or covered in fungus. Computers then tell growers to spray those plants—and only those plants—with insecticide, herbicide, or fungicide.

This helps growers use less water and fewer chemicals, which saves money and keeps farms healthy. Using less insecticide, for example, helps preserve honeybees, which are needed to pollinate many crops. Using less synthetic fertilizer can cut down on pollution. Fertilizer on farms tends to make its way into waterways and, eventually, the ocean, where it devastates sea life. Koppel said that Prospera’s technology has allowed greenhouse growers to use 30% less fertilizer and water.

The hard part is getting computers to determine when crops are sick, injured, or thirsty. So firms have developed systems that can learn to interpret images, growing smarter over time. Those systems also combine information gleaned from images with data on temperature, rainfall, soil quality, and other variables to determine when and how much to spray and water crops.

Ceres Imaging Aerial imaging shows which crops need water or nutrients.

Does this count as artificial intelligence? “If you would ask that with three of our computer science PhDs in the room, you probably wouldn’t get out for a day or two,” Koppel said. He contends that Prospera’s system qualifies as AI given that it is constantly learning on its own. “You’re using machines to continuously figure out what’s going in the field based on imagery,” he said. “Also, the machine is synthesizing data to make decisions.”

Koppel believes that artificial intelligence will usher in the next great agricultural revolution. Previous technological advances—irrigation, mechanization, synthetic fertilizers, genetic engineering—have allowed humans to grow more food with less work. He said that artificial intelligence is going to allow growers to be even more efficient by taking the guesswork out of farming.

“Typically, a farmer will either make a decision based on intuition—which is not data—or he will feel the ground,” he said. He said that, rather than rely on intuition, it would be better to use computers to analyze images of every inch of the farm. Those computers could recommend decisions based on data they have collected from farms all across the world—a grower in Mexico might benefit from data collected on a farm in Israel.

Koppel said that computers can fill in farmers’ blind spots, likening farmers to doctors, who are prone to making mistakes. “I really don’t like to go to the doctor,” he said. “I would prefer having a machine that is unbiased. You know, a doctor maybe saw a few thousand people, and the machine has seen hundreds of millions of people. And the doctor doesn’t remember everything he studied in university, and the machine knows everything all the time.”

In the future, we could see robots that can tell when a strawberry is ripe and pluck it gingerly from the plant, or droids that can find weeds and spray them, or machines that can determine when and how much to feed dairy cows. However, while AI holds incredible promise for farms, it also threatens to be massively disruptive, especially at a time when many farmers are returning to more traditional growing methods.

“Some farmers might not wish to make the transition, either lacking the skills to flourish in a more techno-centric system or the motivation,” said David Rose, an environmental geographer at the University of East Anglia who has written about the future of farming. “Some farmers might not consider the use of AI to be compatible with their lifestyle, preferring instead to use their experiential knowledge and be closely connected to their land.”

He said that autonomous robots could threaten the safety of workers and animals, and could also put a lot of people out of a job. Heavy reliance AI could also sever farmers’ connection to the land. That’s the future depicted in this John Deere commercial, which Rose described as “chilling.”

“I am not saying that we should not embrace AI in agri-tech. It definitely has the potential to improve decision-making, help us cut through data, improve efficient spraying, automate manual or laborious jobs, attract younger, more technical workers to the industry, and increase profitability. But almost no one is talking about the societal and ethical implications of AI on-farm,” he said.

“What does the world look like in which AI is used routinely on-farm? How is that different to now?” he asked. “And how do we look after the potential losers of the tech revolution as well as the winners? I think if we just start thinking about those questions and accepting that, in a democracy, technology trajectories should be open to challenge, then this is a good thing.”

This post originally appeared on Nexus Media.