Skip to content

wanaalif/rice-leaf-disease-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌾 Rice Leaf Disease Classification

A deep learning project to classify rice leaf diseases from images using Convolutional Neural Networks (CNN). Built as part of my personal learning journey in computer vision and machine learning.

📖 Project Overview

Rice crops are vulnerable to several diseases that can significantly reduce yield. This project uses image classification to identify common rice leaf diseases, supporting early detection. The model is trained to distinguish between healthy and diseased rice leaves.

Diseases covered:

  • Blast: Fungal disease appearing as diamond-shaped spots
  • Blight: Bacterial disease causing streaks on leaves
  • Tungro: Viral disease causing yellowing and stunted growth

🛠️ Tech Stack

  • Language: Python
  • Notebook: Jupyter Notebook
  • Frameworks: TensorFlow / Keras
  • Data Handling: Numpy, Pandas, KaggleHub
  • Visualization: Matplotlib, Seaborn (Confusion Matrix)
  • Image Processing: OpenCV

📊 Dataset & Preprocessing

  • Source: Leaf Rice Disease Dataset (Kaggle).
  • Details: 240 images collected in Southeast Sulawesi, Indonesia.
  • Augmentation: Applied random flipping, rotation, zooming, and contrast adjustments to improve generalization.

🏗️ Model Architectures

1. Custom CNN

A lightweight, scratch-built architecture designed for hierarchical feature learning:

  • Three convolutional blocks (32, 64, 128 filters).
  • Max-pooling and Dropout (0.5) for regularization.
  • Softmax output for 3-class classification.

2. Transfer Learning (MobileNetV2)

Utilized a pre-trained MobileNetV2 backbone with a custom classification head.

  • Phase 1: Feature extraction with frozen backbone.
  • Phase 2: Fine-tuning the last 40 layers with a small learning rate ($3 \times 10^{-5}$)

📈 Results

The Custom CNN outperformed the transfer learning approach, likely due to the specialized nature of the small dataset.

Model Accuracy Precision Recall F1-Score
Custom CNN 98% 0.98 0.98 0.98
MobileNetV2 83% 0.83 0.83 0.83

Getting Started

1. Clone the repository

git clone https://github.com/wanaalif/rice-leaf-disease-classification.git
cd rice-leaf-disease-classification

2. Install dependencies

pip install -r requirements.txt

3. Run the notebook

jupyter notebook rice_leaf_disease_classification.ipynb

Project Structure

rice-leaf-disease-classification/
├── docs
|   └── report.pdf
├── rice_leaf_disease_classification.ipynb  # Main notebook
├── requirements.txt
├── README.md
├── LICENSE
└── CONTRIBUTING.md

👥 Contributors

This project was developed by me for the Computer Vision course (SAIA 2133) at Universiti Teknologi Malaysia:

Wan Alif Danial Bin Wan Kamarulfarid (A24AI0093) Section: 4
Lecturer: Ts Dr Norulhusna Ahmad

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines on:

  • Reporting bugs
  • Suggesting enhancements
  • Submitting pull requests
  • Code style guidelines

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

Research References

Key papers that influenced this work:

  1. Kumar et al. (2015) - "The rise of low-cost sensing for managing air pollution in cities"
  2. Mohammed, A. K., et al. (2025). Real-Time Plant Disease Detection by AI. European Journal of Ecology, Biology and Agriculture.

Full references available in docs/report.pdf.

📞 Contact

For questions, suggestions, or collaborations:

📊 Citation

If you use this work in your research, please cite:

@misc{smartcity2024airquality,
  title={Rice Leaf Diseases Image Classification},
  author={Wan Kamarulfarid, Wan Alif Danial},
  year={2026},
  institution={Universiti Teknologi Malaysia},
  howpublished={\url{https://github.com/wanaalif/rice-leaf-disease-classification}}
}

Releases

No releases published

Packages

 
 
 

Contributors