[ICPR GREEN-PR 2026] Pytorch Code for Knowledge Distillation in Plant Recognition Tasks.
Python
1
2 commits
updated Jun 17, 2026
1 Ilyass Moummad, 2 Reda Bensaid, 1,3 Kawtar Zaher, 4 Hervé Goëau, 1 Jean-Christophe Lombardo, 5 Joseph Salmon, 4 Pierre Bonnet, 1 Alexis Joly
1 INRIA, LIRMM, Université de Montpellier
2 IMT Atlantique, Polytech Montreal
3 Institut National de l'Audiovisuel
4 CIRAD, AMAP
5 IMAG, Univ Montpellier, CNRS, Inria
Keywords: Automatic Plant Monitoring · Transfer Learning · Knowledge Distillation · Green Pattern Recognition
This repository implements a straightforward knowledge distillation framework for plant monitoring. By transferring knowledge from larger, high-capacity models to more efficient architectures, this approach enables the training of lightweight models for plant species identification and disease detection.
Download the required datasets:
Pl@ntNet-300K-v2 :
https://zenodo.org/records/10419064
Deep-Plant-Disease :
https://zenodo.org/records/16879271
git clone https://github.com/ilyassmoummad/plantdistill.git
Install required packages (see requirements.txt):
pip install -r requirements.txt
Train a linear classifier on top of a frozen DINOv3 ViT-L backbone on Pl@ntNet-300K-v2:
python main.py --task probe --teacher dinov3l --dataset plantnet300k --data_dir path_to_plantnet300kv2 --ckpt_dir folder_to_save_ckpt
Train a CNX-T model directly on Pl@ntNet-300K-v2:
python main.py --task train --model cnxt --dataset plantnet300k --data_dir path_to_plantnet300kv2 --ckpt_dir folder_to_save_ckpt
Distill knowledge from a DINOv3 teacher into a CNX-T student model:
python main.py --task distill --model cnxt --teacher dinov3l --dataset plantnet300k --data_dir path_to_plantnet300kv2 --ckpt_teacher probed_teacher.pth --ckpt_dir folder_to_save_ckpt
| Argument | Description |
|---|---|
--data_dir | Path to dataset root directory |
--ckpt_dir | Folder for saving checkpoints |
--batch_size | Batch size |
--num_workers | Number of data loading workers |
--lr | Initial learning rate |
--min_lr | Minimum learning rate |
--wd | Weight decay |
--alpha | Coefficient for distillation tradeoff |
--T | Temperature for logits distillation |
--warmup_epochs | Number of warmup epochs |
--epochs | Total training epochs |
--device | Device to use (e.g., cuda, cpu) |
For more details, see args.py
Enable experiment tracking by adding the --wandb flag.
Additional required arguments are listed below:
| Argument | Description |
|---|---|
--wandb_tmpdir | Temporary directory for logs |
--wandb_projname | Project name |
--wandb_entity | Your Weights & Biases entity |
@misc{distillplant,
title={Energy-Efficient Plant Monitoring via Knowledge Distillation},
author={Ilyass Moummad and Reda Bensaid and Kawtar Zaher and Hervé Goëau and Jean-Christophe Lombardo and Joseph Salmon and Pierre Bonnet and Alexis Joly},
year={2026},
eprint={2604.27178},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2604.27178},
}
[ICPR GREEN-PR 2026] Pytorch Code for Knowledge Distillation in Plant Recognition Tasks.
Python
1
2 commits
updated Jun 17, 2026
1 Ilyass Moummad, 2 Reda Bensaid, 1,3 Kawtar Zaher, 4 Hervé Goëau, 1 Jean-Christophe Lombardo, 5 Joseph Salmon, 4 Pierre Bonnet, 1 Alexis Joly
1 INRIA, LIRMM, Université de Montpellier
2 IMT Atlantique, Polytech Montreal
3 Institut National de l'Audiovisuel
4 CIRAD, AMAP
5 IMAG, Univ Montpellier, CNRS, Inria
Keywords: Automatic Plant Monitoring · Transfer Learning · Knowledge Distillation · Green Pattern Recognition
This repository implements a straightforward knowledge distillation framework for plant monitoring. By transferring knowledge from larger, high-capacity models to more efficient architectures, this approach enables the training of lightweight models for plant species identification and disease detection.
Download the required datasets:
Pl@ntNet-300K-v2 :
https://zenodo.org/records/10419064
Deep-Plant-Disease :
https://zenodo.org/records/16879271
git clone https://github.com/ilyassmoummad/plantdistill.git
Install required packages (see requirements.txt):
pip install -r requirements.txt
Train a linear classifier on top of a frozen DINOv3 ViT-L backbone on Pl@ntNet-300K-v2:
python main.py --task probe --teacher dinov3l --dataset plantnet300k --data_dir path_to_plantnet300kv2 --ckpt_dir folder_to_save_ckpt
Train a CNX-T model directly on Pl@ntNet-300K-v2:
python main.py --task train --model cnxt --dataset plantnet300k --data_dir path_to_plantnet300kv2 --ckpt_dir folder_to_save_ckpt
Distill knowledge from a DINOv3 teacher into a CNX-T student model:
python main.py --task distill --model cnxt --teacher dinov3l --dataset plantnet300k --data_dir path_to_plantnet300kv2 --ckpt_teacher probed_teacher.pth --ckpt_dir folder_to_save_ckpt
| Argument | Description |
|---|---|
--data_dir | Path to dataset root directory |
--ckpt_dir | Folder for saving checkpoints |
--batch_size | Batch size |
--num_workers | Number of data loading workers |
--lr | Initial learning rate |
--min_lr | Minimum learning rate |
--wd | Weight decay |
--alpha | Coefficient for distillation tradeoff |
--T | Temperature for logits distillation |
--warmup_epochs | Number of warmup epochs |
--epochs | Total training epochs |
--device | Device to use (e.g., cuda, cpu) |
For more details, see args.py
Enable experiment tracking by adding the --wandb flag.
Additional required arguments are listed below:
| Argument | Description |
|---|---|
--wandb_tmpdir | Temporary directory for logs |
--wandb_projname | Project name |
--wandb_entity | Your Weights & Biases entity |
@misc{distillplant,
title={Energy-Efficient Plant Monitoring via Knowledge Distillation},
author={Ilyass Moummad and Reda Bensaid and Kawtar Zaher and Hervé Goëau and Jean-Christophe Lombardo and Joseph Salmon and Pierre Bonnet and Alexis Joly},
year={2026},
eprint={2604.27178},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2604.27178},
}