Downloads · 30 days
1
0% of all-time downloads
mikejrodd/esca_grapeleaf_classifier
esca_grapeleaf_classifier is a image classification model from mikejrodd. Use it when you need a label for an image. It is set up for keras. The card lists the license as mit.
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 w…
Downloads · 30 days
1
0% of all-time downloads
All-time downloads
14.9K
Public
Repo size
459 MB
Likes
0
Public
Click a slice to open those files.
.keras459 MB · 100%
From the Hugging Face model README
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.
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
The model was trained on a dataset of grapevine leaves collected from various vineyards. The dataset includes:
The dataset used to train this model is sourced from the Grapevine Disease Dataset available under the CC0 Public Domain Dedication.
The model was evaluated using standard classification metrics, including precision, recall, and F1-score, for both classes (healthy and Esca-affected).
precision recall f1-score support
esca 0.79 0.97 0.87 480
healthy 0.99 0.90 0.94 1325
The data used to train this model is licensed under the CC0 Public Domain Dedication. The model itself is licensed under the MIT License.
Special thanks to the contributors of the Grapevine Disease Dataset for providing the data used in training this model.