Weed detection (this is because the freakin title must be at least 15 characters long, Pha!)

Hi all,

could you please explain the workflow from weed detection to weed removal in detail?

If I scan all of my garden bed with the run farmware: plant-detection. Then I will have entries like Map Point: Detected Plant (x, y, z) in my database, right? How can I then navigate to them and remove those weeds? There needs to be a weed variable which runs through all available weed coordinates after detection and then runs a certain sequence.

Am I right that weed detection is not usable yet?

Thanks, Best

At this time you can only create a sequence and choose the coordinate of the detected weed (it’s displayed in the drop-down box just like a plant point). The function to import points (coordinates) automatically is not implemented yet.

I made myself a Farmware which reads the coordinates of points called “weed” and executes a sequence at each of them. With that I was able to check if detected weed coordinates match with their real position in the bed.

1 Like

Hey @Ascend good to hear from you! :grinning:

So the complete weed detection in terms of what is the spread of the plant, what does the optical algorithm detect and is the detection a weed is not yet implemented? For what is then the calibration and weed-detection good a the moment? It makes me really angry each time THEY write about something and pretend to have something implemented which is not true at all. That is fooling the community, I strongly DISKLIKE!!!
Its not a problem if something is in work, but please don’t fool us by pretending to have something already working which then turns out to be not working at all :face_with_symbols_over_mouth: @roryaronson !

Would you be able to share your farmware somehow? I would love to test that!!!
What if the coordinate is just one mm off from plant to weed, did you program a secure space into the farmware?

Thanks, Best

Sure, hopefully I can upload them tomorrow (solar battery empty :tired_face:) on my Github profile after checking if its still working.

I am only moving to weeds that are marked as “save removal” (Red circle in farmdesigner), which are weeds that are not located in the spread area of any plant.

Weed detection is not easily set up at this time, but its really worth to check it out. One important thing that I learned: If you think that your weed detection settings are working, save those values or make a photo. So many times they were gone (didn’t find a cause for that) and I needed to set it up again.

Could you elaborate a bit more on that? The wiki is quite empty about the whole weed detection, handling things, or I was too blind…

Right now the farmware reads the coordinates of all existing weeds, moves there and executes a sequence. I think it would be possible to only use weeds that are safe to remove.

I think the different types of detected weeds are well explained in the Software docs.

Here is the farmware :slightly_smiling_face:
The created sequence which is executed triggers pin 10 for 200ms. This was for testing purposes. You can change the sequence when its created (its created automatically on the first run).

1 Like

As @Ascend has mentioned, the plant-detection farmware creates points that are viewable in the farm designer and can be selected in the move absolute drop-down in your sequences. You could then have a sequence that uses the weeding tool to stomp the weed down, or (with additional hardware) devise a way to spray a weed-killing liquid in that area, or do something else entirely.

At this point however, creating many sequences for handling multiple weeds is tedious, we know. That’s why our next big feature pushes after the upcoming v6 OS release are variables and looping. This will allow you to make one sequence that can loop through all of the weed points that have been detected, so you can handle all of them at once without the need to constantly edit your sequence or duplicate it with new coordinates.

The variables and looping features will also be useful for easily running operations (such as watering or taking photos) on many plants at once, and also allow you to create generic tool mounting/dismounting sequences, and more.

@Klimbim: please refrain from verbally attacking me. FarmBot is a new technology that a) doesn’t work perfectly, b) can be difficult and/or tedious to manage, and c) is a work-in-progress (and will be for a long time to come). Weed detection does work, it is just tedious to use. We’re working on improving that. The same goes with encoders/stall detection, and other aspects of the FarmBot: these things work, but require some fine-tuning, tinkering, and may not be amazingly performant or streamlined experiences yet. We are working hard on improving all aspects of the FarmBot concept every day.


In features like these, I see added benefit of having an Instant Messaging integration. FarmBot could send you a photo of a possible weed and ask “Does this look like weed to you?” [Yes, remove it] [Nope]

Like, when there is a specified threshold. Also, maybe instead of IM, just call some web hook. (as modern IM services tend to use for bots).

Dear @roryaronson, I am not angry about developing a new system, the opposite is true. I am very happy about farmbot, the community and the outlook into future. What I do not like is the feeling to be fooled.
I now saw two FAQ entries on the website which are the first to state that farmbot is in development and the functions which are shown (lets say pretended) to work in the video are not fully developed.

This is a first step towards an honest relationship with YOUR community, that you definitely need. Please carry on to be honest and not try to pretend things which FB is currently not able to. There is really no use to pretend that weed detection is completely working and you can tend your garden in Farmville style

if I need to delete each weed manually. Please, please, please do not pretend to have something developed if it is still under construction…

Any outlook when that might be available?


Sorry, it is never my intention to fool people, only inspire.

You’re right. Which is why we avoid using terms like “completely working”, “fully developed”, “flawlessly”, etc. FarmBot - as with any technology - will never work perfectly for all use-cases, for all people, all of the time. We don’t convey that, and if people think that then they are fooling themselves.

FarmBot can do a lot of things though. And by reading through the docs, trying out the software, asking some questions in the forum, and watching our in-depth videos, one can get a pretty clear idea of how FarmBot might work for them. With some tinkering and sometimes tedious configuration, FarmBot could probably work for most people, environments, and use-cases, but that’s not a guarantee.

Weed detection does work. But will it perfectly detect every weed every time? No. Will it work in an indoor growing environment with those purple lights? Maybe, I haven’t tried. Does FarmBot deal with the weeds once it detects them? Only if you configure it to.

My point is, we’re not pretending that something works when it doesn’t. We’re highlighting the features that do work, sharing a vision, and getting people excited. We’ll always be making systems more robust and reliable, adding more features to make FarmBot more automated and efficient, and working to cover as many use-cases as possible, but FarmBot simply can never be guaranteed to meet everyone’s expectations.

At this time I prefer to not estimate.


Any road plan, or milestones specified? I mean, some entry point for people who just got/want to get involved?

With all respect, you, your team and other people made a pile of good work. But. Recently I got a task; whether I could build a farmbot, for someone. And that person kinda expected similar things as @Klimbim . I have been around opensource/diy for some time, but that person did not. For me, software/hardware is never finished, for them, they expected somehow ready appliance, that could be developed further. Or a specified a current state of supported features out of box.

At the moment (at least it seems), a lot of currently not supported features could be dona via farmware like:

  • weed/water all plus filters, like "water all celery, planted more than 6 days ago, didn’t got any water last 7 hours & it’s day time according to geodata
  • photo whole bed - align picture with real dimensions, then prepare tool path, merge with hugin/autopano.
  • call a web hook (upload sensor data, weed found, picture upload)

I still need a testbed environment and get a grip on erlang.

On some other thread you used a term “CNC Farming”, which I think, at least for now, is a best description of project. And I’m going to present farmbot as that.

Anyway, thumbs up!

1 Like

Hey @Ascend that was quite interesting to test out :slight_smile:
So if I use your farmware in the sequence dialog, it shows the “content” which you posted above the first time I hit TEST in the sequence where I call this farmware. How do I get there later on?

I mean best would be, if this farmware could call a weed destruction sequence if it is initiated, right? Then I could define how far the weeder should go down during the destruction sequence…? Would it be possible for you to implement this?

Does that mean that your farmware WeedStomp goes through each coordinate which is deemed to be a weed and executes this sequence? How is the travelling in between done? Questions over questions, I hope that I can set everything up until early spring :wink:

If I got you right, it already is. When you run the firmware the first time, the program adds a sequence called “FW_Weedstomp” if it’s not already there. From there it uses the created sequence even if you made any changes.

So in general you need to fix the “weeding sequence” for your needs after the first run. Just go into the “FW_Weedstomp” sequence and add/modify the steps that you want to perform above each weed point.

It will “move absolute” to the first weed and runs the “FW_Weedstomp” sequence at this position as described earlier.

Import x and y coordinates from a weed point and “move absolute” there.

Hey @Ascend thanks again for your information, great news! Could you quickly describe which weed type is taken into account in your farmware?


Hi ascend,

could you explain a little bit more how your farmware takes the coordinates from the database for weeds? From what I saw in your code it searches for “weed” but as I am not familiar with this programming language, I don´t know how that exactly works?! Would you maybe need to adapt to the current naming convention?

I do have “Map Point: Weed (xxx,yyy,zzz)” and “Map Point: Safe-Remove Weed(xxx,yyy,zzz)” named points in my database after the weed detection. These are shown in the drop down menu in the move absolute sequence…

Hey Klim, sorry for that delay.

The farmware uses the “Map Point: Weed” values and does care if any intentionally planted plant gets damage. I didn’t check how reliable “safe-remove weeds” are detected and separated. Right now I am only using this farmware to check the calibration / weed detection function. Soon I will try to figure this out and improve the code.

Could you quickly describe how you find out if a weed could be safely removed within your farmware? When I ran it, I had those two points mentioned above in my database but it did not travel to the „Map Point: Weed…“ so it must have detected that it is too near to a plant (which could have been the case btw.). Is there any way of checking if a weed is deemed unsafe to remove within your farmware?

The decision if a weed can be safe-removed or not is made at weed-detection already. Someone would need to check if the weeds are separated correctly.

I just figured out that the farmware didn’t work anymore since the API urls changed back in december.
Please run the firmware again and see if it works as you expect :slight_smile:

Sorry again @roryaronson @RickCarlino, but weed detection cannot properly succeed the way you design it. Running the weed detection farmware on each picture cannot succeed in detecting weed located at the frontier between 2 pictures, that’s pretty easy to understand, but you keep with this wrong approche since the beginning. Again, pictures should be uploaded in the cloud, assembled and weed detection should be done on the full picture.

More over, the weed detection adds weeds in the inventory, without any validation or filtering capabilities to remove false positives, this is practically unusable…

1 Like