Vernard commited on
Commit
548bbc0
Β·
verified Β·
1 Parent(s): cc89f67

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +103 -34
README.md CHANGED
@@ -1,55 +1,124 @@
1
- # AgriScan EfficientNetB0 β€” Crop and Disease Classification
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- ## Overview
 
 
4
 
5
- AgriScan EfficientNetB0 is an experimental agricultural image-classification system developed by CDSA (Cross Domain Solution Architect).
6
 
7
- The system uses two independently trained EfficientNetB0 classifiers to identify selected crops and predict their corresponding disease or healthy condition.
8
 
9
- ## Model Architecture
10
 
11
- ### 1. Crop Classifier
12
 
13
- Model file: `agriscan_efficientnet_crop.keras`
14
 
15
- Predicts one of three crop categories:
16
- - Maize
17
- - Potato
18
- - Tomato
19
 
20
- ### 2. Disease Classifier
 
 
 
21
 
22
- Model file: `agriscan_efficientnet_disease.keras`
23
 
24
- Predicts one of 17 crop-disease or healthy classes across maize, potato and tomato.
25
 
26
- ## Training
 
 
 
 
27
 
28
- - Architecture: EfficientNetB0
29
- - Framework: TensorFlow / Keras
30
- - Input dimensions: 224 Γ— 224 pixels
31
- - Input format: RGB
32
- - Dataset: PlantVillage
33
- - Training method: Transfer learning followed by fine-tuning
34
- - Evaluation: Held-out test set from the source dataset
35
 
36
- ## Evaluation
37
 
38
- Evaluation metrics and class-level reports are provided in the repository.
39
 
40
- Published performance figures should be taken from the completed evaluation artifacts, not assumed from the training process.
41
 
42
- ## Intended Use
 
 
 
 
 
43
 
44
- This model is intended for research, prototyping and testing agricultural image-classification workflows.
45
 
46
- ## Limitations
47
 
48
- - The classifiers cover only the crop and disease classes represented in training.
49
- - The model is not guaranteed to identify unfamiliar diseases or distinguish all non-plant images from crop leaves.
50
- - PlantVillage images may differ from photographs taken under real farming conditions.
51
- - Predictions should be validated using field data and, where necessary, agricultural expertise.
52
 
53
- ## Development
54
 
55
- Developed as part of the AgriScan agricultural intelligence initiative by CDSA.
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: other
5
+ library_name: keras
6
+ pipeline_tag: image-classification
7
+ tags:
8
+ - agriscan
9
+ - agriculture
10
+ - plant-disease
11
+ - crop-classification
12
+ - image-classification
13
+ - efficientnet
14
+ - efficientnetb0
15
+ - tensorflow
16
+ - keras
17
+ - plantvillage
18
+ datasets:
19
+ - mohanty/PlantVillage
20
+ ---
21
+
22
+ # AgriScan EfficientNetB0 β€” Crop and Plant Disease Classifiers
23
+
24
+ AgriScan is an agricultural intelligence project developing computer-vision tools to support crop identification and plant-health screening.
25
+
26
+ This repository is intended to contain two separately trained EfficientNetB0 models:
27
+
28
+ 1. **Crop classifier** β€” predicts whether an image belongs to maize, potato, or tomato.
29
+ 2. **Disease classifier** β€” predicts one of 17 crop-condition classes across those crops.
30
+
31
+ > **Status:** Research and pilot prototype. Add measured evaluation results after the training notebook has completed successfully.
32
+
33
+ ## Repository contents
34
+
35
+ Expected files:
36
+
37
+ ```text
38
+ .
39
+ β”œβ”€β”€ README.md
40
+ β”œβ”€β”€ agriscan_efficientnet_crop.keras
41
+ β”œβ”€β”€ agriscan_efficientnet_disease.keras
42
+ β”œβ”€β”€ crop_names.json
43
+ β”œβ”€β”€ class_names.json
44
+ β”œβ”€β”€ evaluation_metrics.json
45
+ β”œβ”€β”€ crop_classification_report.csv
46
+ β”œβ”€β”€ disease_classification_report.csv
47
+ β”œβ”€β”€ crop_confusion_matrix.csv
48
+ └── disease_confusion_matrix.csv
49
+ ```
50
+
51
+ Upload only the files that have actually been generated. Evaluation reports and metrics should be added after the training and evaluation cells finish.
52
+
53
+ ## Model details
54
+
55
+ | Property | Crop classifier | Disease classifier |
56
+ |---|---|---|
57
+ | Architecture | EfficientNetB0 | EfficientNetB0 |
58
+ | Task | Crop classification | Crop-condition classification |
59
+ | Number of output classes | 3 | 17 |
60
+ | Input | RGB image | RGB image |
61
+ | Input size | 224 Γ— 224 pixels | 224 Γ— 224 pixels |
62
+ | Model format | Keras `.keras` | Keras `.keras` |
63
+
64
+ The training workflow uses transfer learning with an ImageNet-pretrained EfficientNetB0 backbone, first training the classification head and then fine-tuning upper backbone layers.
65
+
66
+ ### Crop classes
67
 
68
+ - Maize
69
+ - Potato
70
+ - Tomato
71
 
72
+ ### Disease classes
73
 
74
+ The 17 output labels are defined in `class_names.json`. **The JSON order is significant** because it maps each output index to its label. Use the exact file produced by the training notebook; do not manually reorder the labels.
75
 
76
+ ## Dataset and evaluation
77
 
78
+ The training workflow uses the `mohanty/PlantVillage` dataset and its `splits/color_train.txt` and `splits/color_test.txt` manifests, filtered to maize, potato, and tomato classes.
79
 
80
+ The training partition is divided into training and validation subsets. The source test partition is reserved for final evaluation.
81
 
82
+ No performance metrics are stated here because the EfficientNetB0 training run must complete before results can be reported. After evaluation, update this section using the generated `evaluation_metrics.json` and classification reports. Report the test-set size and metrics exactly as measured; do not use training or validation scores as test scores.
83
+
84
+ ## Input preprocessing
 
85
 
86
+ - Convert the image to RGB.
87
+ - Resize to 224 Γ— 224 pixels.
88
+ - Supply pixel values in the range expected by the saved model.
89
+ - The Keras EfficientNetB0 backbone includes input rescaling. Do not apply MobileNetV2-specific `Rescaling(1/127.5, offset=-1)` preprocessing unless the model architecture is deliberately changed and retrained.
90
 
91
+ Use the model's actual training/inference pipeline when deploying it.
92
 
93
+ ## Recommended inference flow
94
 
95
+ 1. Run the crop classifier.
96
+ 2. Run the disease classifier.
97
+ 3. Read the predicted labels using `crop_names.json` and `class_names.json`.
98
+ 4. Compare the crop predicted by the crop classifier with the crop implied by the disease-class label.
99
+ 5. If the two classifiers disagree, or confidence is low, return an uncertain/review result instead of presenting a definitive diagnosis.
100
 
101
+ The two classifiers are independent models. A downstream application must implement the routing, confidence policy, and disagreement handling.
 
 
 
 
 
 
102
 
103
+ ## Intended use
104
 
105
+ This model is intended for research, prototyping, and controlled pilot evaluation of crop classification and plant-disease image classification for maize, potato, and tomato.
106
 
107
+ ## Limitations and responsible use
108
 
109
+ - This is a closed-set classifier. It is not a general plant detector and may assign an unsupported label to non-plant images.
110
+ - It predicts only among the classes represented in the training labels; unknown diseases and other crops are not supported.
111
+ - PlantVillage images may differ from farmer field photographs in lighting, backgrounds, camera quality, geography, crop varieties, and disease severity.
112
+ - A high softmax score is not a guarantee of correctness and should not be treated as calibrated probability without further calibration work.
113
+ - Predictions are not a substitute for expert agricultural advice or laboratory diagnosis.
114
+ - Validate on representative real-world field images before operational deployment.
115
 
116
+ ## Citation and attribution
117
 
118
+ The dataset used by the training workflow is available as [`mohanty/PlantVillage`](https://huggingface.co/datasets/mohanty/PlantVillage). Review the dataset card and its terms before redistributing derived assets.
119
 
120
+ ## Contact and project
 
 
 
121
 
122
+ Project: **AgriScan**, an agricultural intelligence initiative associated with CDSA.
123
 
124
+ For deployment, document the model version, training date, dataset version, evaluation results, and any changes to preprocessing or class mappings.