Deep Learning Applications in Agriculture 🌽


I am interested in how deep learning is affecting the way we grow our food. It would be interesting to discuss current and potential applications of deep learning in the various nodes of the agricultural supply chain:

  1. Input (seeds, fertilizers, animal food)
  1. Production (from sowing to harvest)
  1. Processing and storage
  2. Distribution/logistics


If you are interested in this as well feel free to share your views!


In January, I fine-tuned Resnet50 with the PlantVillage dataset, slightly outperforming a previously published result. I’m building an app, similar to Plantix, to serve this and similar insights to farmers to help with #4, because it takes a while to get the right fungicides, and pesticides if you have to wait for people in Whatsapp groups to answer questions based on photos taken. It is in alpha.

I know the original PlantVillage team has since moved on to using a single-shot detector for real-time, on-device disease detection, but a web-service approach should work for people who don’t have a powerful enough smartphone. This is what I’m doing.


Very interesting topic, thanks for starting it !

1 Like

Hi there im intrested in deep learning for Agri. I am currently building a robot to selectively spray for weeds in a grassland field. My skills are in the building of the hardware but I have been learning a little about deep learning from the fast ai videos. I think it would be a cool project to do open source.


This is super interesting! I read your post, and just as an idea: is it possible to have a drone recognize weeds AND spray selectively in real time (no GPS coordinates there). I suspect the drone should be a custom build… The major challenge I can think of is the weight of the herbicide (although some drones already have this functionality DJI MG1S) but one could devise a way so that the drone goes across the field and back and replenishes its stock with a moving reservoir that moves slowly across the field’s border as the drone progresses through the field.

I’m super interested in this area too - appreciate you starting the thread and posting such great research :slight_smile:


So… this happened:

Recognize weeds and spray in real time


Just this week Barack Obama made a speech at the Univeristy of Illinois. He opened with “It is good to be home. It’s good to see corn, beans. I was trying to explain to somebody as we were flying in, that’s corn. That’s beans. They were very impressed at my agricultural knowledge.”

Well, at the risk of ‘patting oneself on the back’, I scored 2nd place and a $4k prize in CrowdAnalytix’s “Agricultural Crop Cover Classification Challenge - Perform image segmentation to determine which fields are growing corn or soybeans” in Illinois producing predictions as shown below (1px = 30m). I don’t know how it would compare to Obama’s expert knowledge.

Competition rules mean I can’t detail the method, suffice to say and U-net and opencv were my friends. And I learnt a lot about opencv and remote sensing in the process.

I would say to learners, do not be intimidated or constrained by subject matter: the transferability of what you learn here from dogs v cats to fashion to agriculture to medicine is a key lesson.


I love this question. I have thought the exact same thing. The applications seem pretty obvious, given that agriculture is such a precision-based, sensor-driven industry now.

I think there are two ways to think about applications: (a) in terms of today’s value chain in the ag industry and (b) in terms of a new value chain or delivery framework that currently doesn’t exist but can be enabled by deep learning coupled with other nascent technologies in robotics, optics, and biotech.

i bet the biggest challenge is not technical but strategic. a lot of growers might be too risk averse to replace a key aspect of their supply chain with an ML-powered product or device. that said i bet “enthusiast” customers would be very interested, e.g. small hydroponic growers or individuals with large gardens. what do you think?

Another angle I’ve thought about is how ML can just change the entire supply chain in general. Could an ML-powered device or service (drone, app, whatever) enable much higher yield growing in people’s apartments or home gardens? Maybe an app with a camera that, scanned over my garden, can tell me which plants are getting too much water or too little, or whether fertilizer is needed, or that a certain bug or disease is starting to affect a particular plant.

Francisco, are you working in this space?


1 Like

William I am not. My family comes from the agricultural world so this is an industry I am specially familiar with.

My favorite project all around which I have not posted here yet because it is not strictly agricultural fits exactly with your description. I introduce you to Farmbot. Enjoy.


@lesscomfortable that’s an impressive project.

Given your experience (and your family’s experience) in farming, what would you say are the biggest opportunities for applying machine learning? What parts of the supply chain are most expensive or costly? In what parts of the supply chain do you think deep learnig / ML sensing could radically transform the economics the most?

And I see you’re in BA! I love BA and was there last month! Sos argentino?

I don’t have much experience myself. What I believe is that the future of agriculture is a swarm of intelligent, interconnected robots performing specific tasks and sharing information. Something along the lines of the small robot company. Low hanging fruit in Argentina at least is herbicides and pesticides (planes that go through all the field) although I do not know how relevant it is to the overall cost structure for farmers. Precision vs scale is the big difference with sowing, fertilizing, herbicides and pesticides and harvesting. Much efficiency to be gained and less damage to the soil (e.g. we could plant different plants in the same field if the swarm of robots knows how to recognize and harvest each of the different species).

Anyway, for raw food in the supermarket the share of dollar of the farmer is less than $0.25 so the big efficiency gains impacting final price will probably happen in the logistics and retail.

Is the future of food home-grown? Maybe. I am not sure. I like the decentralized tone of this future and seems much more robust to large scale epidemics. I like to think of the future as a place where anyone can be provider of anything if he/she makes the investment (energy via solar panels, food via automatic home-grown systems, currency by mining etc.).

Yes 100% Argentino!

1 Like

(Replying again, as I realized I misread some of what you were saying :slight_smile: )

About this:

Anyway, for raw food in the supermarket the share of dollar of the farmer is less than $0.25 so the big efficiency gains impacting final price will probably happen in the logistics and retail.

Interesting, I didn’t know this about the cost distribution. Your take about logistics and retail makes sense, that they could be the bigger opportunity areas. But what would innovation there look like? I’ve only seen startups (and innovation in general) on the grow side (e.g. the small robot company, RootWave) Are these startups tackling the wrong problem? The bigger issue (and economic opportunity) seems to be post-farm.

In short, should we focus less on farm-stage innovations and more on logistics innovations? How can ML help agriculture logistics? Is there a way to do it so that (1) farmers keep a higher fraction of the final price and (2) consumers pay less for food?

I’m really interested in how this could look. And also, how farming (or food cultivation, to be more method-agnostic) can be reengineered to avoid logistics and retail altogether, or need it less.

One area I’m very interested in is hydroponics. It’s rapidly growing, there’s a lot of innovation in cultivation processes, and I bet the supply chain is pretty different. I don’t know much about the industry, though.

Yes 100% Argentino!

And cool :slight_smile: what crops has your family grown, and in what region of the country?

I bet Argentina would be a very good place for startups working on this. Lots of diversity in climate and land, so lots of potential for application and finding the right initial use case for a technology. And the universities are great too, right? I’ve heard about UBA.

Congrats on your prize @digitalspecialists :slight_smile: Very cool. Are you working on anything else related to agriculture? How did you come across this contest?

Thank you for sharing this. Do you any blogs detailing the work ?.

I’m going to build a little Ag robot to help me weed lettuce and leafy brassica seedlings in my 75cm wide beds.

I’m reasonably confident I can build the thing & get it following a line (of seedlings). It will straddle the row of seedlings and slowly move along it.

I’d like to slow down or even stop the bot when it detects a ‘weed’ (which may just be any plant not identified as part of the row) Move an actuator over the ‘green in the wrong place’ and laser it.

I’ve not done any computer vision stuff before and I could really do with some help with that aspect. I’ve started a bit of research here:

Does anyone fancy helping out?



Hi Sam,

nice looking robot!

have you seen this thread? Grassland Weed detector - #94 by ptd006

What training data have you got?

Jetson Nano is a good choice.

Many people are interested with ag robots. Mostly it is hobby though so finding time is hard.


1 Like

Nice, I’ll take a look at that thread.

I found some datasets and listed them here: GitHub - Agroecology-Lab/Open-Weeding-Delta: Open Weeding Delta - AI based weed removal robot

1 Like

I’m also working on a robotics project currently, though it’s not for ag. I’m still working on learning how to build the robot and control it with ROS2. Happy to try and answer any questions as you run into them. The robot is a side project for now, but the purpose is ground based image data capture for a number of DL applications.

1 Like