Code and data for the article "Improve the Deep Learning Models in Forestry Based on Explanations and Expertise" by Ximeng Cheng, Ali Doosthosseini and Julian Kunkel (2022). (https://doi.org/10.3389/fpls.2022.902105)
The PlantVillage dataset used in the article is publicly available. It can be found at: https://github.com/spMohanty/PlantVillage-Dataset.
This dataset should be downloaded and placed inside data/
The explanations require GradCAM to be installed. See https://github.com/jacobgil/pytorch-grad-cam.
- Split the data into train/test/validation sets using the scripts in
utils
. Set the masks as desired. - Build and train the model using the methods in
utils/model.py
. For the explanations, use the methods inutils/explanables.py
.
See experiment_1.py
, experiment_2.py
,experiment_3.py
for the experiments used in the article.
Please consider citing our paper if it helps in your work:
Ximeng Cheng, Ali Doosthosseini, & Julian Kunkel (2022). Improve the Deep Learning Models in Forestry Based on Explanations and Expertise. Frontiers in Plant Science. 13:902105. DOI