File size: 2,921 Bytes
cc16033
 
 
 
 
 
 
 
 
 
 
 
 
 
74fbede
cc16033
 
 
 
 
 
 
74fbede
cc16033
 
 
 
 
 
 
74fbede
cc16033
74fbede
 
cc16033
 
7e72bfc
6f967d4
7e72bfc
cc16033
 
 
 
 
 
7e72bfc
1b553d4
cc16033
 
7e72bfc
cc16033
 
 
 
 
 
 
 
 
 
 
 
 
74fbede
cc16033
 
 
 
 
74fbede
 
 
 
 
 
 
 
 
 
cc16033
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: swin-tiny-patch4-window7-224_ft_mango_leaf_disease
  results:
  - task:
      name: Image Classification
      type: image-classification
    dataset:
      name: imagefolder
      type: imagefolder
      config: default
      split: train
      args: default
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9986111111111111
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# swin-tiny-patch4-window7-224_ft_mango_leaf_disease

This model was trained from scratch on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0089
- Accuracy: 0.9986

## Model description
Multiclass image classification model based on [swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) and fine-tuned with Mango🥭 Leaf🍃🍂 Disease Dataset.
Model was trained on 8 classes based on mango leaves health : 
Anthracnose, Bacterial Canker, Cutting Weevil, Die Back, Gall Midge, Powdery Mildew, Sooty Mould, Healthy

## Intended uses & limitations

More information needed

## Training and evaluation data
Traning and evaluation data are from this Kaggle dataset [Mango🥭 Leaf🍃🍂 Disease Dataset](https://www.kaggle.com/datasets/aryashah2k/mango-leaf-disease-dataset).
Amount of images used was 90% of total images (3600 of 4000, 450 images from each class).

## Training procedure
Dataset split : 75% train set, 20% validation set, 5% test set.

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 64
- eval_batch_size: 64
- seed: 143
- gradient_accumulation_steps: 4
- total_train_batch_size: 256
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 10

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| No log        | 0.93  | 10   | 0.1208          | 0.9931   |
| 0.1082        | 1.95  | 21   | 0.0551          | 0.9958   |
| 0.1082        | 2.98  | 32   | 0.0297          | 0.9958   |
| 0.0342        | 4.0   | 43   | 0.0189          | 0.9986   |
| 0.0342        | 4.93  | 53   | 0.0156          | 0.9972   |
| 0.0164        | 5.95  | 64   | 0.0122          | 0.9972   |
| 0.0164        | 6.98  | 75   | 0.0100          | 0.9986   |
| 0.0099        | 8.0   | 86   | 0.0096          | 0.9986   |
| 0.0099        | 8.93  | 96   | 0.0090          | 0.9986   |
| 0.0085        | 9.3   | 100  | 0.0089          | 0.9986   |


### Framework versions

- Transformers 4.33.3
- Pytorch 2.0.1+cu118
- Datasets 2.14.5
- Tokenizers 0.13.3