A tool to segment foliar diseases like powdery mildew or yellow rust on wheat leaves
LE GOURRIEREC Titouan
CONNESSON Léna
PROUVOST Axel
Report a bug · Request Feature
Table of Contents
This project involves the development of a tool and a machine learning model for the detection and segmentation of foliar diseases such as powdery mildew or rust on wheat leaves. Ultimately, this tool is used to compare phenotypic blends of wheat to determine the ideal mixture for increasing yields while reducing pesticide usage.
By employing a random forest algorithm for pixel classification, we demonstrate an accuracy of 99% on isolated disease patches, with average error rates of 14% for rust and 5% for powdery mildew, indicative of minor actual surface errors. Though performance on real leaf samples, characterized by more nuanced textures, is modest, it is enhanced through outlier exclusion, achieving practical accuracies of 62% for rust and 52% for powdery mildew. This study highlights the potential of AI-driven high-throughput methods in mitigating pesticide use through improved understanding and management of crop diseases.
Once executed, the code generates a directory containing the leaves extracted from the original image, along with their segmented versions. Additionally, it produces a CSV file containing information about the labels and areas of each disease, as well as the leaves.
-
Ilastik software: To utilize this code, please download the Ilastik software tailored to your computer's operating system from: https://www.ilastik.org/download.
-
Trained model: Additionally, you'll need to download a trained model from this Google Drive link. There are four models available, each corresponding to different color spaces. We recommend downloading the LAB.ilp model for optimal performance.
- Clone the repository
git clone https://github.com/titouanlegourrierec/Leaf_Disease_Segmentation.git
- Create a python virtual environment
python -m venv env
-
Activate your virtual environment
- For Windows :
env\Scripts\activate
- For MacOS & Linux :
source env/bin/activate
-
Install the required dependencies from the requirements.txt file
pip install -r requirements.txt
To use this project, you have two options:
- GUI Interface: Utilize it through the graphical user interface.
env/bin/python segmenter.py
Here, you have an interface where you can choose the input directory containing images to process, the directory where processed images will be saved, and the path to the model you want to use. Then, click on the "run" button and wait for the result.
- Terminal Command: Use it via command line in the terminal.
env/bin/python segmenter.py -i path/to/input/directory -o path/to/output/directory -p /path/to/trained/model
Distributed under the GNU License. See LICENSE
for more information.
LE GOURRIEREC Titouan - [email protected]
Project Link: https://github.com/titouanlegourrierec/Leaf_Disease_Segmentation
- Ilastik Software : An interactive interface to annotate images to segment.
- EasIlastik package : A package to facilitate the use of trained model on Ilastik for image segmentation.