Arko007 commited on
Commit
1ececc7
·
verified ·
1 Parent(s): a7d12c5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +46 -40
README.md CHANGED
@@ -3,55 +3,61 @@ language:
3
  - en
4
  license: mit
5
  tags:
6
- - image-classification
7
- - pytorch
8
- - convnext
9
- - plant-disease
10
  - agriculture
 
 
 
11
  - edge-cloud
 
 
12
  pipeline_tag: image-classification
13
- model-index:
14
- - name: ConvNeXt-Large Cloud Plant Classifier
15
- results:
16
- - task:
17
- type: image-classification
18
- name: Image Classification
19
- dataset:
20
- name: Plant Disease Classification Merged Dataset (88 Classes)
21
- type: plant-disease-classification-merged-dataset
22
- metrics:
23
- - type: accuracy
24
- value: 96.42
25
- name: Validation Accuracy
26
  ---
27
 
28
- # ConvNeXt-Large Cloud Plant Classifier
 
 
29
 
30
- This repository hosts the **ConvNeXt-Large** cloud classifier model trained as part of the *Confidence-Aware Adaptive Edge–Cloud Framework for Reliable Plant Disease Diagnosis in Low-Connectivity Agricultural Environments*.
 
 
31
 
32
- The cloud model serves as the high-capacity, heavy diagnostician tier of the cooperative inference pipeline. It is triggered dynamically by the edge node when a captured leaf image exhibits high epistemic uncertainty (vacuity u > tau_vac) or low conformal confidence (p_max < tau_conf).
 
 
33
 
34
- ## Model Architecture
35
- - **Backbone**: ConvNeXt-Large (originally pre-trained on ImageNet-1K)
36
- - **Classifier Head**: Modified Linear Layer projecting to 88 pathological crop classes
37
- - **Input Dimension**: 384 x 384 pixels (higher resolution to capture fine-grained leaf spots)
 
 
38
 
39
- ## Training Setup & Parameters
40
- - **Dataset**: Merged Plant Disease Dataset (88 unique classes spanning laboratory and field-captured folders).
41
- - **Optimization Strategy**: Parameter-Efficient Fine-Tuning (PEFT) with convolutional stages 1–3 frozen, training only the 4th stage and classifier head.
42
- - **Optimizer**: AdamW (Learning Rate: 1e-4, Weight Decay: 1e-3)
43
- - **Loss Function**: Cross-Entropy Loss
44
- - **Train/Val Split**: 85% Train / 15% Validation (Stratified per-folder split)
45
 
46
- ## Operational Performance (Epoch 7 Results)
47
- Below are the recorded metrics from the training session:
48
 
49
- | Metric | Score / Value | Description |
50
- | :--- | :--- | :--- |
51
- | **Training Loss** | `0.1039` | Cross-Entropy loss at epoch 7 |
52
- | **Training Accuracy** | `96.47%` | Accuracy over the training split |
53
- | **Validation Loss** | `0.1028` | Cross-Entropy loss on the held-out split |
54
- | **Validation Accuracy** | **`96.42%`** | Calibrated validation classification rate |
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
- ## Integration & Deployment
57
- The model checkpoint is designed to be hosted in a FastAPI-based Docker container on Hugging Face Spaces (Port 7860), responding to offloading queries via HTTP REST or binary JSON over MQTT v5 brokers.
 
 
 
3
  - en
4
  license: mit
5
  tags:
 
 
 
 
6
  - agriculture
7
+ - plant-pathology
8
+ - convnext
9
+ - deep-learning
10
  - edge-cloud
11
+ metrics:
12
+ - accuracy
13
  pipeline_tag: image-classification
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ---
15
 
16
+ # ConvNeXt-Large Cloud Plant Disease Diagnostician
17
+
18
+ This repository hosts the high-capacity **Cloud Classifier (ConvNeXt-Large)** for the *Adaptive Edge-Cloud Plant Disease Diagnosis* framework. The model is dynamically queried by edge nodes running `MobileNetV4-EDL` when classification confidence is low or uncertainty is high.
19
 
20
+ ## 1. Mathematical and Framework Documentation
21
+ A complete mathematical report detailing the Evidential Deep Learning (EDL), Unsupervised Domain Adaptation (UDA), and Conformal Calibration models is compiled as a PDF and available in this repository:
22
+ 👉 **[Read the Mathematical Report (PDF)](https://huggingface.co/Arko007/adaptive-cloud-plant-model/blob/main/model_report.pdf)**
23
 
24
+ ---
25
+
26
+ ## 2. Model Architecture and Training Details
27
 
28
+ - **Model Type**: ConvNeXt-Large
29
+ - **Number of Classes**: 88 (spanning various crop types including Apple, Tomato, Wheat, Soybean, Sugarcane, Tea, etc.)
30
+ - **Resolution**: $384 imes 384$ pixels
31
+ - **Optimization Strategy**: Stages 1-3 of the backbone were frozen to optimize GPU efficiency.
32
+ - **Optimizer**: AdamW (Learning Rate: $10^{-4}$, Weight Decay: $10^{-3}$)
33
+ - **Loss Function**: Categorical Cross-Entropy
34
 
35
+ ### Training & Validation Loss Curves
36
+ ![Loss Curve](https://huggingface.co/Arko007/adaptive-cloud-plant-model/resolve/main/loss_curve.png)
 
 
 
 
37
 
38
+ ### Training & Validation Accuracy Curves
39
+ ![Accuracy Curve](https://huggingface.co/Arko007/adaptive-cloud-plant-model/resolve/main/accuracy_curve.png)
40
 
41
+ ---
42
+
43
+ ## 3. Convergence Metrics Summary
44
+ The model was trained for 7 epochs on Kaggle GPU environments using a stratified dataset split (30,103 training images, 5,347 validation images):
45
+
46
+ | Epoch | Training Loss | Training Accuracy (%) | Validation Loss | Validation Accuracy (%) |
47
+ |:---:|:---:|:---:|:---:|:---:|
48
+ | 1 | 0.6872 | 82.83% | 0.1986 | 93.44% |
49
+ | 2 | 0.2168 | 93.04% | 0.1420 | 95.05% |
50
+ | 3 | 0.1629 | 94.61% | 0.1330 | 95.37% |
51
+ | 4 | 0.1394 | 95.45% | 0.1153 | 95.80% |
52
+ | 5 | 0.1235 | 95.83% | 0.1167 | 96.08% |
53
+ | 6 | 0.1104 | 96.24% | 0.1152 | 95.84% |
54
+ | 7 | **0.1039** | **96.47%** | **0.1028** | **96.42%** |
55
+
56
+ *Note: Checkpoints for all epochs, including the best-performing `convnext_large_cloud_best.pth`, are stored directly in the Hugging Face model repository.*
57
+
58
+ ---
59
 
60
+ ## 4. Collaborative Gating Mechanism
61
+ The Cloud model acts as a secondary diagnostician in the cooperative pipeline. The lightweight edge node decides whether to query this model by checking:
62
+ 1. **Evidential Vacuity Threshold ($u > \tau_{vac}$)**: Triggers if the leaf image has out-of-distribution patterns or high epistemic uncertainty.
63
+ 2. **Conformal Confidence Threshold ($p_{max} < \tau_{conf}$)**: Triggers if the calibrated categorical prediction confidence is low.