Skip to content

bakibillahrahat/ricevision

Repository files navigation

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"

📌 Overview

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.


🏗️ Methodology

  1. Dataset: Rice Leaf Disease (with augmentation).
  2. Preprocessing: Resize → Augmentation (Flip, Rotation, Color Jitter) → Tensor conversion → Normalization.
  3. Backbones:
    • BiT-M-R50x1 (pre-trained)
    • ResNet152 (pre-trained)
    • Both frozen, with LoRA adapters injected into Conv layers.
  4. 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].
  5. Head: Fully-connected MLP → classification logits.
  6. Evaluation: 5-Fold Stratified Cross Validation, reports accuracy, precision, recall, F1-score, confusion matrix.

📊 Results

  • K-Fold Accuracies: [0.9576, 0.9546, 0.9541, 0.9643, 0.9457]
  • Mean Accuracy: 95.53% ± 0.60%

🛠️ Installation & Usage

1. Clone Repository

git clone https://github.com/mdbakibillahrahat/ricevision.git
cd ricevision

2. Install Dependencies

pip install -r requirements.txt

3. Open the Jupyter Notebook

jupyter notebook notebooks/rice_disease_classification.ipynb

4. Run all cells step by step

About

This repository implements a high-accuracy rice leaf disease classification using a fusion deep learning model. It combines multiple architectures, employs data preprocessing and K-Fold cross-validation, and provides reliable predictions for monitoring rice crop health.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors