Edit model card

Grapevine Disease Classification Model

Overview

This model is designed to classify grapevine leaves as either "healthy" or affected by Esca disease. For this model, healthy is defined as not having signs of Esca, meaning signs of blight, rot, and other infections will be classified as healthy/non-Esca. Esca is a serious fungal disease that affects grapevines, causing significant damage to vineyards. Early detection of Esca can help in managing and controlling its spread, ensuring healthier vineyards and better grape yields.

Model Details

  • Model Architecture: Convolutional Neural Network (CNN)
  • Input: Images of grape leaves
  • Output: Binary classification indicating whether the leaf is healthy or affected by Esca
  • focal_loss function:
def focal_loss(gamma=2., alpha=0.25):
    def focal_loss_fixed(y_true, y_pred):
        y_true = tf.cast(y_true, tf.float32)
        y_pred = tf.clip_by_value(y_pred, tf.keras.backend.epsilon(), 1 - tf.keras.backend.epsilon())
        alpha_t = y_true * alpha + (tf.ones_like(y_true) - y_true) * (1 - alpha)
        p_t = y_true * y_pred + (tf.ones_like(y_true) - y_true) * (tf.ones_like(y_true) - y_pred)
        focal_loss_value = -alpha_t * tf.math.pow((tf.ones_like(y_true) - p_t), gamma) * tf.math.log(p_t)
        return tf.reduce_mean(focal_loss_value)
    return focal_loss_fixed

Dataset

The model was trained on a dataset of grapevine leaves collected from various vineyards. The dataset includes:

  • Healthy Leaves: Images of grapevine leaves that are not affected by Esca disease but may contain other diseases.
  • Esca-Affected Leaves: Images of grapevine leaves showing symptoms of Esca disease, such as discoloration, brown spots, and unusual texture.

Data Source

The dataset used to train this model is sourced from the Grapevine Disease Dataset available under the CC0 Public Domain Dedication.

Model Performance

Evaluation Metrics

The model was evaluated using standard classification metrics, including precision, recall, and F1-score, for both classes (healthy and Esca-affected).

Classification Report

      precision    recall  f1-score   support

esca       0.79      0.97      0.87       480
healthy    0.99      0.90      0.94      1325

Accuracy

  • Accuracy: 0.92

License

The data used to train this model is licensed under the CC0 Public Domain Dedication. The model itself is licensed under the MIT License.

Acknowledgements

Special thanks to the contributors of the Grapevine Disease Dataset for providing the data used in training this model.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference API
Drag image file here or click to browse from your device
Unable to determine this model's library. Check the docs .