Chili Disease Classifier (VGG16-Augmented)
Model Summary
This is a computer vision model based on the VGG16 architecture, fine-tuned to identify 6 types of chili leaf conditions. To improve generalization over standard models, it utilizes Global Average Pooling and heavy Dropout (0.7) to prevent overfitting on small datasets.
- Base Model: VGG16 (Pre-trained on ImageNet)
- Input Resolution: 224x224x3 (RGB)
- Output: 6-class Softmax
- Regularization: L2 Weight Decay (0.01) and 70% Dropout
- Framework: TensorFlow/Keras
Classes
- Bacterial Spot
- Cercospora Leaf Spot
- Curl Virus
- Healthy Leaf
- Nutrition Deficiency
- White Spot
Training Details
- Dataset: Chili Leaf Disease Augmented Dataset (approx. 1,856 images).
- Training Strategy: Two-stage training.
- Stage 1: Frozen base, training custom head (LR: $1e-4$).
- Stage 2: Fine-tuning Block 5 and Block 4 (LR: $1e-6$ to $1e-8$).
- Augmentation: Random flips, rotations, zoom, and contrast adjustments were applied during training to improve real-world robustness.
Limitations & Performance (On current)
- The model is highly disciplined. For real-world images, it may produce confidence scores in the 60-70% range. Users should implement a threshold (e.g., < 50% = "Retake Photo").
- Performance may vary in extremely low light or if the leaf is not centered.
How to Use (Inference)
import tensorflow as tf
# Load the model directly (The Lambda preprocessing layer is included)
model = tf.keras.models.load_model('chili_model_final.h5')
# Predict
img = tf.keras.utils.load_img(path, target_size=(224, 224))
img_array = tf.keras.utils.img_to_array(img)
img_array = tf.expand_dims(img_array, 0)
predictions = model.predict(img_array)