Weeds are the unwanted crops in agriculture lands. They disturb the growing plants around them. Weeds are dependent plants which use nutrients, water, etc resources. So we need to remove them as early as possible. So this project will help to detect the weed in between plants further we can add a mechanical arm which will automatically pick weed and remove them.
We can use this code to detect weeds in agriculture lands.
I used YOLO(You Only Look Once) Real time object detection algorithm to detect weeds. Dataset i used is taken from kaggle and dataset name is crop and weed detection data with bounding boxes (Link to dataset) which contains around 1300 images. Traning is done in Goole Colab.
Structure of the repository
├───testing
│ ├───images
│ └───results
└───traning
├───backup
└───test
- Traning folder consists of files used for traning
- Testing folder consists of testing file
Clone the repo and Upload Traning file in google drive and open ipynb file in colab and then you can change the parameters and you can play with the code.
For testing and for using the project download weights from the link and paste it in testing folder.
In testing folder we have two files use detect_image.py to detect in image and use detect_video.py for detecting in video and with webcame access.
- Program detected crop in image
- Program detected weed in image
- Program detecting weeds and crops in video