Image Classification
Keras
English
agriscan
agriculture
plant-disease
crop-classification
efficientnet
efficientnetb0
tensorflow
plantvillage
Instructions to use Vernard/AgriScan_EfficientNetB0_Two_Classifier_Training with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Vernard/AgriScan_EfficientNetB0_Two_Classifier_Training with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Vernard/AgriScan_EfficientNetB0_Two_Classifier_Training") - Notebooks
- Google Colab
- Kaggle
Upload 9 files
Browse files- .gitattributes +2 -0
- agriscan_efficientnet_crop.keras +3 -0
- agriscan_efficientnet_disease.keras +3 -0
- class_names.json +19 -0
- crop_classification_report.csv +7 -0
- crop_confusion_matrix.csv +4 -0
- crop_names.json +5 -0
- disease_classification_report.csv +21 -0
- disease_confusion_matrix.csv +18 -0
- evaluation_metrics.json +37 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
agriscan_efficientnet_crop.keras filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
agriscan_efficientnet_disease.keras filter=lfs diff=lfs merge=lfs -text
|
agriscan_efficientnet_crop.keras
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dfd3748d775a677fe85adfe4c7c9db154f21aff8bd81e8ca6dbea14d25a2273a
|
| 3 |
+
size 41552469
|
agriscan_efficientnet_disease.keras
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:adce9b1c6741610c59154010ed0bd6fc2eafde2dde5533b8bfde11a5996ecc32
|
| 3 |
+
size 41767701
|
class_names.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
"Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot",
|
| 3 |
+
"Corn_(maize)___Common_rust_",
|
| 4 |
+
"Corn_(maize)___Northern_Leaf_Blight",
|
| 5 |
+
"Corn_(maize)___healthy",
|
| 6 |
+
"Potato___Early_blight",
|
| 7 |
+
"Potato___Late_blight",
|
| 8 |
+
"Potato___healthy",
|
| 9 |
+
"Tomato___Bacterial_spot",
|
| 10 |
+
"Tomato___Early_blight",
|
| 11 |
+
"Tomato___Late_blight",
|
| 12 |
+
"Tomato___Leaf_Mold",
|
| 13 |
+
"Tomato___Septoria_leaf_spot",
|
| 14 |
+
"Tomato___Spider_mites Two-spotted_spider_mite",
|
| 15 |
+
"Tomato___Target_Spot",
|
| 16 |
+
"Tomato___Tomato_Yellow_Leaf_Curl_Virus",
|
| 17 |
+
"Tomato___Tomato_mosaic_virus",
|
| 18 |
+
"Tomato___healthy"
|
| 19 |
+
]
|
crop_classification_report.csv
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
,precision,recall,f1-score,support
|
| 2 |
+
Maize,1.0,1.0,1.0,794.0
|
| 3 |
+
Potato,0.9975,0.9779411764705882,0.9876237623762376,408.0
|
| 4 |
+
Tomato,0.9975322182615849,0.9997251992305578,0.9986275048037332,3639.0
|
| 5 |
+
accuracy,0.9979343110927494,0.9979343110927494,0.9979343110927494,0.9979343110927494
|
| 6 |
+
macro avg,0.9983440727538616,0.9925554585670486,0.9954170890599903,4841.0
|
| 7 |
+
weighted avg,0.997934257850425,0.9979343110927494,0.9979252189692812,4841.0
|
crop_confusion_matrix.csv
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
,Maize,Potato,Tomato
|
| 2 |
+
Maize,794,0,0
|
| 3 |
+
Potato,0,399,9
|
| 4 |
+
Tomato,0,1,3638
|
crop_names.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
"Maize",
|
| 3 |
+
"Potato",
|
| 4 |
+
"Tomato"
|
| 5 |
+
]
|
disease_classification_report.csv
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
,precision,recall,f1-score,support
|
| 2 |
+
Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot,0.9142857142857143,0.897196261682243,0.9056603773584906,107.0
|
| 3 |
+
Corn_(maize)___Common_rust_,1.0,0.9953917050691244,0.9976905311778291,217.0
|
| 4 |
+
Corn_(maize)___Northern_Leaf_Blight,0.9454545454545454,0.9454545454545454,0.9454545454545454,220.0
|
| 5 |
+
Corn_(maize)___healthy,0.9960159362549801,1.0,0.998003992015968,250.0
|
| 6 |
+
Potato___Early_blight,0.9879518072289156,1.0,0.9939393939393939,164.0
|
| 7 |
+
Potato___Late_blight,0.9761904761904762,0.9669811320754716,0.9715639810426541,212.0
|
| 8 |
+
Potato___healthy,0.9696969696969697,1.0,0.9846153846153847,32.0
|
| 9 |
+
Tomato___Bacterial_spot,0.9839449541284404,0.9839449541284404,0.9839449541284404,436.0
|
| 10 |
+
Tomato___Early_blight,0.9587628865979382,0.8651162790697674,0.9095354523227384,215.0
|
| 11 |
+
Tomato___Late_blight,0.9437340153452686,0.984,0.9634464751958225,375.0
|
| 12 |
+
Tomato___Leaf_Mold,0.9940119760479041,0.9651162790697675,0.9793510324483776,172.0
|
| 13 |
+
Tomato___Septoria_leaf_spot,0.9672619047619048,0.9643916913946587,0.9658246656760773,337.0
|
| 14 |
+
Tomato___Spider_mites Two-spotted_spider_mite,0.9434523809523809,0.990625,0.9664634146341463,320.0
|
| 15 |
+
Tomato___Target_Spot,0.9425675675675675,0.96875,0.9554794520547946,288.0
|
| 16 |
+
Tomato___Tomato_Yellow_Leaf_Curl_Virus,0.9981600735970562,0.9863636363636363,0.9922267946959304,1100.0
|
| 17 |
+
Tomato___Tomato_mosaic_virus,0.9696969696969697,0.9696969696969697,0.9696969696969697,66.0
|
| 18 |
+
Tomato___healthy,0.9939577039274925,0.996969696969697,0.9954614220877458,330.0
|
| 19 |
+
accuracy,0.9750051642222681,0.9750051642222681,0.9750051642222681,0.9750051642222681
|
| 20 |
+
macro avg,0.9697144636314426,0.9694116559396659,0.9693152257967829,4841.0
|
| 21 |
+
weighted avg,0.9752442219862905,0.9750051642222681,0.9749148480133657,4841.0
|
disease_confusion_matrix.csv
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
,Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot,Corn_(maize)___Common_rust_,Corn_(maize)___Northern_Leaf_Blight,Corn_(maize)___healthy,Potato___Early_blight,Potato___Late_blight,Potato___healthy,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
|
| 2 |
+
Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot,96,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
| 3 |
+
Corn_(maize)___Common_rust_,0,216,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
| 4 |
+
Corn_(maize)___Northern_Leaf_Blight,9,0,208,1,0,0,0,0,0,2,0,0,0,0,0,0,0
|
| 5 |
+
Corn_(maize)___healthy,0,0,0,250,0,0,0,0,0,0,0,0,0,0,0,0,0
|
| 6 |
+
Potato___Early_blight,0,0,0,0,164,0,0,0,0,0,0,0,0,0,0,0,0
|
| 7 |
+
Potato___Late_blight,0,0,0,0,0,205,1,0,0,6,0,0,0,0,0,0,0
|
| 8 |
+
Potato___healthy,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0
|
| 9 |
+
Tomato___Bacterial_spot,0,0,0,0,0,0,0,429,2,0,0,2,0,2,1,0,0
|
| 10 |
+
Tomato___Early_blight,0,0,0,0,0,2,0,3,186,7,0,3,2,10,0,1,1
|
| 11 |
+
Tomato___Late_blight,0,0,0,0,0,3,0,0,1,369,0,1,0,0,1,0,0
|
| 12 |
+
Tomato___Leaf_Mold,0,0,0,0,0,0,0,0,1,2,166,2,1,0,0,0,0
|
| 13 |
+
Tomato___Septoria_leaf_spot,0,0,0,0,2,0,0,0,3,4,0,325,0,1,0,1,1
|
| 14 |
+
Tomato___Spider_mites Two-spotted_spider_mite,0,0,0,0,0,0,0,0,0,0,0,0,317,3,0,0,0
|
| 15 |
+
Tomato___Target_Spot,0,0,0,0,0,0,0,0,0,0,0,2,7,279,0,0,0
|
| 16 |
+
Tomato___Tomato_Yellow_Leaf_Curl_Virus,0,0,0,0,0,0,0,4,1,1,0,0,9,0,1085,0,0
|
| 17 |
+
Tomato___Tomato_mosaic_virus,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,64,0
|
| 18 |
+
Tomato___healthy,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,329
|
evaluation_metrics.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architecture": "EfficientNetB0",
|
| 3 |
+
"image_size": [
|
| 4 |
+
224,
|
| 5 |
+
224
|
| 6 |
+
],
|
| 7 |
+
"crop_classes": [
|
| 8 |
+
"Maize",
|
| 9 |
+
"Potato",
|
| 10 |
+
"Tomato"
|
| 11 |
+
],
|
| 12 |
+
"disease_classes": [
|
| 13 |
+
"Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot",
|
| 14 |
+
"Corn_(maize)___Common_rust_",
|
| 15 |
+
"Corn_(maize)___Northern_Leaf_Blight",
|
| 16 |
+
"Corn_(maize)___healthy",
|
| 17 |
+
"Potato___Early_blight",
|
| 18 |
+
"Potato___Late_blight",
|
| 19 |
+
"Potato___healthy",
|
| 20 |
+
"Tomato___Bacterial_spot",
|
| 21 |
+
"Tomato___Early_blight",
|
| 22 |
+
"Tomato___Late_blight",
|
| 23 |
+
"Tomato___Leaf_Mold",
|
| 24 |
+
"Tomato___Septoria_leaf_spot",
|
| 25 |
+
"Tomato___Spider_mites Two-spotted_spider_mite",
|
| 26 |
+
"Tomato___Target_Spot",
|
| 27 |
+
"Tomato___Tomato_Yellow_Leaf_Curl_Virus",
|
| 28 |
+
"Tomato___Tomato_mosaic_virus",
|
| 29 |
+
"Tomato___healthy"
|
| 30 |
+
],
|
| 31 |
+
"test_images": 4841,
|
| 32 |
+
"crop_accuracy": 0.9979343110927494,
|
| 33 |
+
"crop_macro_f1": 0.9954170890599903,
|
| 34 |
+
"disease_accuracy": 0.9750051642222681,
|
| 35 |
+
"disease_macro_f1": 0.9693152257967829,
|
| 36 |
+
"disease_weighted_f1": 0.9749148480133657
|
| 37 |
+
}
|