Grassland Weed detector

(Gavin Armstrong) #22

I’m not sure what the best way to go in regards to real time sensing or a delayed approach to give the machine time to process the images. I was thinking about stopping the machine for each picture to try and prevent shaking in the images as most farmland is bumpy. Then I though about one of those gimbals that DJI do to stabilise images on drones and even motorbikes/handhelds? Not sure if that would stop motion blur with sharp movements. Do the pics need to be sharp? Could the images be blurred as part of the dataset? I think this might effect accuracy?

If the machine was large with solar panels I think it could take it’s time and stop for each picture. If it’s small and light with just batteries maybe it could spray in real time coming back to home for charging up. In my application taking days to spray a 30 acres field would be just fine.

(Gavin Armstrong) #23

Today I tested the solenoids I purchased off eBay. The solenoids run on 12v and have standard tap fittings which can connect to standard 13mm irrigation pipe. The nozzle bodies are also designed for 13 internal bore pipe so it’s nice and standardized all the way back to the pump. I have 8 off these in total to spread over a 3m boom. For relay control I went with one of these.

(Kodiak Labs) #24

@Gavztheouch I think we could add Gaussian blur (a simple type of blurring techinique) to the data samples, and see how much blur affects the accuracy. Or, we could see what the pictures are like that come from the machine.

EDIT: Instead of writing a new post, I thought I would just add to this one. I am working on building a classifier using the fastai library for your samples. Running into some troubles, but just touching base to let you know I am working on it.

(Kodiak Labs) #25

@Gavztheouch: Found the problem, and worked with the data. I was able to get 94.29% accuracy on your validation set. Will clean up the notebook and post it online.

(Gavin Armstrong) #26

Wow that’s prob genuinely the best broadleaf dock detector in the world. :slight_smile:

I think the validation set is quite small which might cause issues when trying to validate your model with any accuracy. I have added quite a few new examples recently but yet to reupload to kaggle, when I reupload I can afford to add lots more to the validation set.

I have found that this year creeping buttercups have also been quite an issue. The same chemical is also used to remove them so it might be valuable to add them to the model. Maybe next year…

Another feature that might be cool is the ability to add new pictures to the dataset automatically. I’m not sure how you would go about doing that, but I would imagine you could run thousands of pics back through the model and classify them, any pics with a high confidence score could be duplicated into the correct folder. I initially though this would be a good idea to help bulk out the pics of broadleaf docks as each image of the field once broken down into smaller pics typically contains more grass pics than dock pics. If I automatically sort them I can afford to throw out some pics of grass as I did not spend time classifying then myself.

(Kodiak Labs) #27


I had a feeling the validation set was small (kept getting a few of the same distinct scores when training). Bulking up more of the dataset would be ideal.

Regarding the Buttercups: This is no problem for the algorithm, and we can even use ideas and techniques from Kaggle to help us as there has been a competition on invasive species detection already.

Regarding automatic additions: Totally agree on how you would do this.

As for your build, are you going to open source the build instructions (part list, CAD files, etc.)?

(Gavin Armstrong) #28

The plan was to use Fusion 360 for the CAD and post all files on GitHub or similar. Fusion 360 is free to use for hobby projects and is an excellent program. Im keen to be involved in a project like this where a team works together to collaborate on a design. My background is prototype building and product design engineering (Now hay/grass farming).

I have a decent workshop with mig welders, cnc routers/mills, lathes, plasma cutters etc.

(Kodiak Labs) #29

Glad to hear the designs will be open-sourced. That’s something I am keen to work on.

Also, when you get the time, it would be great if you could upload the remaining data.

Finally, we should think about setting up a Slack channel or some such, to talk about the project.


Hi, guys!

I’m also very interested in this project. Moreover, I’ve started to collect my own pictures from the ‘land’. Maybe we can change with each other and check our validity and also possibility of transfer learning.

(Kodiak Labs) #31

Hi all,

so I finally finished the benchmark classifier using the fastai library. I have reached a decent accuracy score of 96.7%, and an ROC score of 0.975. I have uploaded the details to github.

Feel free to critique it and offer suggestions to improve upon it.

(Gavin Armstrong) #32

Hi just to let everyone know I have updated the kaggle dataset there are now over 1000 dock images and about 3000 not dock images in the training set.

The validation set had been greatly increased so hopefully much more fun to try and hit higher accuracys knowing it means something. Each class has at least 130 images.

Kodiaklabs I had a quick look at your notebook and it looks great. I will try and study it tonight and see if I can fill follow along, maybe try running it on Google colab with the updated dataset if that is possible.