Enhanced Classification of Rice Plant Diseases using Ensemble Models with BiT, ResNet152 and LoRA-based Gated Fusion
This repository contains the official PyTorch implementation of our research work:
"Enhanced Classification of Rice Plant Diseases Using Ensemble Models with BiT, ResNet152 and LoRA-based Gated Fusion"
Rice plant diseases significantly reduce crop productivity worldwide. In this project, we propose a novel ensemble framework combining BiT (ResNetV2-50x1 Bit-M) and ResNet152 with LoRA adapters for parameter-efficient fine-tuning.
A Gated Fusion mechanism learns adaptive weights (α, β) for each backbone, fuses the representations, and passes enriched features into a classification head.
Our approach achieves 95%+ accuracy with 5-Fold Stratified Cross Validation, demonstrating the effectiveness of adaptive fusion and LoRA integration.
- Dataset: Rice Leaf Disease (with augmentation).
- Preprocessing: Resize → Augmentation (Flip, Rotation, Color Jitter) → Tensor conversion → Normalization.
- Backbones:
- BiT-M-R50x1 (pre-trained)
- ResNet152 (pre-trained)
- Both frozen, with LoRA adapters injected into Conv layers.
- Fusion:
- Features extracted from both backbones.
- A small Gate MLP predicts adaptive weights (α, β).
- Features aligned and fused:
[ f_{\text{fused}} = \alpha f_{\text{bit}} + \beta f_{\text{res}} ] - Final enriched vector =
[f_bit, f_res, fused].
- Head: Fully-connected MLP → classification logits.
- Evaluation: 5-Fold Stratified Cross Validation, reports accuracy, precision, recall, F1-score, confusion matrix.
- K-Fold Accuracies: [0.9576, 0.9546, 0.9541, 0.9643, 0.9457]
- Mean Accuracy: 95.53% ± 0.60%
git clone https://github.com/mdbakibillahrahat/ricevision.git
cd ricevisionpip install -r requirements.txtjupyter notebook notebooks/rice_disease_classification.ipynb