This project aims to classify diseases in plants and detect the ripeness level of fruits using Convolutional Neural Network (CNN) in Python and TensorFlow. The project utilizes image data to identify plant diseases and classify the ripeness level of fruits based on the given images.
The dataset used consists of images of plant diseases and fruits with corresponding labels. The dataset is divided into two main categories: "Classification of Diseases in Plants" and "Ripeness Fruits Detection."
Dataset Kaggle : https://kaggle.com/datasets/3610a14d2bb20a8bf03afa10859dc6642461f317c9a8eb23e99379ad91ce2b07
This dataset contains images of plant leaves infected with diseases, and we have 2 Types of Diseased Plants, such as :
- 🌽 Corn ( Jagung ) 🍃- [Common Rust, Gray Leaf Spot, Healthy, Northern Leaf Blight]
- 🍁: Cassava ( Singkong ) 🍃 - [Bacterial Blight, Brown Streak Disease, Green Mottle, Healthy, Mosaic Disease]
- 🍅 Tomato ( Tomat ) 🍃 - [Bacterial Spot, Early Blight, Healthy, Late Blight, Leaf Mold, Mosaic Virus, Septoria Leaf Spot, Spider Mites, Target Spot, Yellow Leaf Curl Virus]
- 🍚 Rice ( Padi ) 🌾 - [Brown Spot, Healthy, Hispa, Leaf Blast, Neck Blast]
- 🍎 Apple ( Apel ) 🍃 - [Black Rot, Healthy, Rust, Scab]
- 🍠 Potato ( Potato ) 🍃 - [Early Blight, Healthy, Late Blight]
- 🍇 Grape ( Anggur ) 🍃 - [Black Rot, ESCA, Healthy, Leaf Blight]
- 🍂 Soybean (Kacang Hijau) 🍃 - [Bacterial Blight, Caterpillar, Diabrotica, Speciosa, Downy Mildew, Healthy, Mosaic Virus, Powdery Mildew, Rust, Southern Blight]
This dataset contains images of fruits at various ripeness levels (unripe and ripe), such as :
- 🍌 Pisang - [Mentah, Matang]
- 🍅 Tomat - [Mentah, Matang]
A Convolutional Neural Network (CNN) model is used to classify both dataset categories. The model architecture can be customized based on requirements, but for this project, the following architecture is used:
- Input Layer
- Convolutional Layers: Used for feature extraction from the images.
- Max Pooling Layers: Used for dimensionality reduction of the features.
- Flatten Layer: Flattens the features into a vector.
- Fully Connected Layers: Perform classification tasks.
- Output Layer: Outputs the classification predictions, it depends on labels.
Pretrained Architechture (MobileNet-v1) :
Model | Accuracy | Loss |
---|---|---|
Corn ( Jagung ) |
97% | 9% |
Apple ( Apel ) |
99% | 6% |
Grape ( Anggur ) |
98% | 4% |
Potato ( Kentang ) |
98% | 9% |
Cassava ( Singkong ) |
89% | 27% |
Rice ( Padi ) |
89% | 36% |
Tomato ( Tomat ) |
98% | 6% |
Soybean ( Kacang Hijau ) |
96% | 15% |
Model | Accuracy | Loss |
---|---|---|
Banana ( Pisang ) |
99% | 2% |
Tomato ( Tomat ) |
99% | 2% |
- Python 3 - v3.10
- Keras - v2.12.0
- TensorFlow - v2.12.0
- NumPy - v1.23.5
- Matplotlib - v3.6.3
- Clone this repository to your local machine.
- Install all the required dependencies.
- Make sure the dataset is available and placed in the appropriate directory structure.
- Run the script to train the model and perform the evaluation.
- You can customize the script, model architecture, or hyperparameters according to your needs.
[1] Convolutional Neural Networks (CNNs) - Stanford University, https://cs231n.github.io/convolutional-networks/
[2] TensorFlow Documentation, https://www.tensorflow.org/api_docs
[3] Dataset
- All of the disease = https://www.kaggle.com/datasets/alinedobrovsky/plant-disease-classification-merged-dataset/code
- Cassava dataset = https://scholarsphere.psu.edu/resources/215d1acd-2c1e-440b-a27a-03d212761ef7
- Tomato = https://www.kaggle.com/datasets/kevinbagaskara/kematangan-buah-tomat?select=Matang
- Banana = https://github.com/luischuquim/BananaRipeness/tree/main/Banana%20Images
- Grape = https://www.kaggle.com/datasets/rm1000/augmented-grape-disease-detection-dataset
[4] Paper for Pretrained Model
- Howard, A. G. (2017, April 17). MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv.org. https://arxiv.org/abs/1704.04861
This project is developed by C23-PS050 Team Bangkit as part of Bangkit Product Capstone.
- M305DSX2364 - Muhammad Dafa Ardiansyah
- M132DSX1278 - Rais Ilham Nustara
- M038DKY4284 - Sarah Alissa Putri