ilyassmoummad/distillplant

[ICPR GREEN-PR 2026] Pytorch Code for Knowledge Distillation in Plant Recognition Tasks.

Python

1

2 commits

updated Jun 17, 2026

See the code

README

Energy-Efficient Plant Monitoring via Knowledge Distillation (ICPR GREEN-PR 2026)

arXiv

👩‍💻 Authors

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


⚡ Overview

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.


📂 Data Preparation

Download the required datasets:


💻 Installation

git clone https://github.com/ilyassmoummad/plantdistill.git

Install required packages (see requirements.txt):

pip install -r requirements.txt

🚀 Training

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

⚙️ Arguments

Core Arguments

ArgumentDescription
--data_dirPath to dataset root directory
--ckpt_dirFolder for saving checkpoints
--batch_sizeBatch size
--num_workersNumber of data loading workers
--lrInitial learning rate
--min_lrMinimum learning rate
--wdWeight decay
--alphaCoefficient for distillation tradeoff
--TTemperature for logits distillation
--warmup_epochsNumber of warmup epochs
--epochsTotal training epochs
--deviceDevice to use (e.g., cuda, cpu)

For more details, see args.py

📊 (Optional) Weights & Biases Logging

Enable experiment tracking by adding the --wandb flag.
Additional required arguments are listed below:

ArgumentDescription
--wandb_tmpdirTemporary directory for logs
--wandb_projnameProject name
--wandb_entityYour Weights & Biases entity

📝 To cite this work:

@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}, 
}

ilyassmoummad/distillplant

[ICPR GREEN-PR 2026] Pytorch Code for Knowledge Distillation in Plant Recognition Tasks.

Python

1

2 commits

updated Jun 17, 2026

See the code

README

Energy-Efficient Plant Monitoring via Knowledge Distillation (ICPR GREEN-PR 2026)

arXiv

👩‍💻 Authors

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


⚡ Overview

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.


📂 Data Preparation

Download the required datasets:


💻 Installation

git clone https://github.com/ilyassmoummad/plantdistill.git

Install required packages (see requirements.txt):

pip install -r requirements.txt

🚀 Training

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

⚙️ Arguments

Core Arguments

ArgumentDescription
--data_dirPath to dataset root directory
--ckpt_dirFolder for saving checkpoints
--batch_sizeBatch size
--num_workersNumber of data loading workers
--lrInitial learning rate
--min_lrMinimum learning rate
--wdWeight decay
--alphaCoefficient for distillation tradeoff
--TTemperature for logits distillation
--warmup_epochsNumber of warmup epochs
--epochsTotal training epochs
--deviceDevice to use (e.g., cuda, cpu)

For more details, see args.py

📊 (Optional) Weights & Biases Logging

Enable experiment tracking by adding the --wandb flag.
Additional required arguments are listed below:

ArgumentDescription
--wandb_tmpdirTemporary directory for logs
--wandb_projnameProject name
--wandb_entityYour Weights & Biases entity

📝 To cite this work:

@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}, 
}