Downloads · 30 days
0
wisamWR/Tomato_Leaf_Diseases-CNN_Comparative_Analysis
Tomato_Leaf_Diseases-CNN_Comparative_Analysis is a image classification model from wisamWR. Use it when you need a label for an image. It is set up for keras. The card lists the license as mit.
Model klasifikasi gambar buat deteksi penyakit daun tomat. Base: EfficientNetV2B0 (transfer learning, ImageNet weights), head custom (GlobalAveragePooling → Dense 128 → Dropout 0.5 → Softmax 10 kelas). Dipilih sbg mod…
Downloads · 30 days
0
Access
Public
Updated Jun 10, 2026
Repo size
2.1 GB
Likes
0
Public
Click a slice to open those files.
.h52.1 GB · 98%
From the Hugging Face model README
Model klasifikasi gambar buat deteksi penyakit daun tomat. Base: EfficientNetV2B0 (transfer learning, ImageNet weights), head custom (GlobalAveragePooling → Dense 128 → Dropout 0.5 → Softmax 10 kelas). Dipilih sbg model terbaik dari perbandingan 14 arsitektur CNN (VGG, ResNet, DenseNet, MobileNet, EfficientNet, Xception, NASNet).
tf.keras.applications.efficientnet_v2.preprocess_input.h5 format)Tomato_Bacterial_spot
Tomato_Early_blight
Tomato_Late_blight
Tomato_Leaf_Mold
Tomato_Septoria_leaf_spot
Tomato_Spider_mites_Two_spotted_spider_mite
Tomato_Target_Spot
Tomato_Tomato_Yellow_Leaf_Curl_Virus
Tomato_Tomato_mosaic_virus
Tomato_Healthy
| Metric | Score |
|---|---|
| Accuracy | 97.38% |
| Precision | 0.9702 |
| Recall | 0.9631 |
| F1-Score | 0.9664 |
Best di antara 14 model yang dibandingkan (VGG16/19, ResNet50/101/152/50V2, EfficientNet B0/B3/V2B0/V2B3/V2S, DenseNet121/169/201, Xception, NASNetMobile/Large, MobileNetV3 Small/Large).
PlantVillage Tomato Leaf Dataset — gambar daun tomat terbagi ke 10 kelas (9 penyakit + sehat). Split stratified 80/20 train-validation, oversampling kelas minoritas di set training.
import tensorflow as tf
import numpy as np
from PIL import Image
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(repo_id="<username>/<repo-name>", filename="EfficientNetV2B0_best.h5")
model = tf.keras.models.load_model(model_path)
CLASS_NAMES = [
"Tomato_Bacterial_spot", "Tomato_Early_blight", "Tomato_Late_blight",
"Tomato_Leaf_Mold", "Tomato_Septoria_leaf_spot",
"Tomato_Spider_mites_Two_spotted_spider_mite", "Tomato_Target_Spot",
"Tomato_Tomato_Yellow_Leaf_Curl_Virus", "Tomato_Tomato_mosaic_virus", "Tomato_Healthy",
]
image = Image.open("daun_tomat.jpg").convert("RGB").resize((224, 224))
arr = np.expand_dims(tf.keras.applications.efficientnet_v2.preprocess_input(np.array(image, dtype=np.float32)), axis=0)
preds = model.predict(arr)[0]
print(CLASS_NAMES[int(np.argmax(preds))], float(np.max(preds)))
Demo Streamlit ada di app.py.
Detail eksperimen, EDA, dan perbandingan semua arsitektur ada di tomato-leaf-diseases-cnn-comparative-analysis.ipynb.