tustoz commited on
Commit
b15d499
·
verified ·
1 Parent(s): 7fb1931

tustoz/plant-disease-resnet50

Browse files
Files changed (5) hide show
  1. README.md +87 -0
  2. config.json +121 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +23 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: microsoft/resnet-50
5
+ tags:
6
+ - generated_from_trainer
7
+ datasets:
8
+ - imagefolder
9
+ metrics:
10
+ - accuracy
11
+ model-index:
12
+ - name: resnet50
13
+ results:
14
+ - task:
15
+ name: Image Classification
16
+ type: image-classification
17
+ dataset:
18
+ name: imagefolder
19
+ type: imagefolder
20
+ config: default
21
+ split: validation
22
+ args: default
23
+ metrics:
24
+ - name: Accuracy
25
+ type: accuracy
26
+ value: 0.9926
27
+ ---
28
+
29
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
30
+ should probably proofread and complete it, then remove this comment. -->
31
+
32
+ # resnet50
33
+
34
+ This model is a fine-tuned version of [microsoft/resnet-50](https://huggingface.co/microsoft/resnet-50) on the imagefolder dataset.
35
+ It achieves the following results on the evaluation set:
36
+ - Loss: 0.0210
37
+ - Accuracy: 0.9926
38
+ - F1 Weighted: 0.9926
39
+ - F1 Macro: 0.9925
40
+ - Precision Weighted: 0.9926
41
+
42
+ ## Model description
43
+
44
+ More information needed
45
+
46
+ ## Intended uses & limitations
47
+
48
+ More information needed
49
+
50
+ ## Training and evaluation data
51
+
52
+ More information needed
53
+
54
+ ## Training procedure
55
+
56
+ ### Training hyperparameters
57
+
58
+ The following hyperparameters were used during training:
59
+ - learning_rate: 0.0003
60
+ - train_batch_size: 128
61
+ - eval_batch_size: 256
62
+ - seed: 42
63
+ - gradient_accumulation_steps: 2
64
+ - total_train_batch_size: 256
65
+ - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
66
+ - lr_scheduler_type: linear
67
+ - lr_scheduler_warmup_steps: 0.1
68
+ - num_epochs: 5
69
+ - mixed_precision_training: Native AMP
70
+
71
+ ### Training results
72
+
73
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Weighted | F1 Macro | Precision Weighted |
74
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:-----------:|:--------:|:------------------:|
75
+ | 3.7125 | 1.0 | 193 | 0.1263 | 0.961 | 0.9604 | 0.9602 | 0.9628 |
76
+ | 0.1261 | 2.0 | 386 | 0.0376 | 0.9882 | 0.9882 | 0.9881 | 0.9885 |
77
+ | 0.0347 | 3.0 | 579 | 0.0232 | 0.9926 | 0.9926 | 0.9925 | 0.9927 |
78
+ | 0.0165 | 4.0 | 772 | 0.0238 | 0.992 | 0.992 | 0.9919 | 0.9921 |
79
+ | 0.0109 | 5.0 | 965 | 0.0210 | 0.9926 | 0.9926 | 0.9925 | 0.9926 |
80
+
81
+
82
+ ### Framework versions
83
+
84
+ - Transformers 5.0.0
85
+ - Pytorch 2.10.0+cu128
86
+ - Datasets 4.0.0
87
+ - Tokenizers 0.22.2
config.json ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ResNetForImageClassification"
4
+ ],
5
+ "depths": [
6
+ 3,
7
+ 4,
8
+ 6,
9
+ 3
10
+ ],
11
+ "downsample_in_bottleneck": false,
12
+ "downsample_in_first_stage": false,
13
+ "dtype": "float32",
14
+ "embedding_size": 64,
15
+ "hidden_act": "relu",
16
+ "hidden_sizes": [
17
+ 256,
18
+ 512,
19
+ 1024,
20
+ 2048
21
+ ],
22
+ "id2label": {
23
+ "0": "Apple___Apple_scab",
24
+ "1": "Apple___Black_rot",
25
+ "2": "Apple___Cedar_apple_rust",
26
+ "3": "Apple___healthy",
27
+ "4": "Blueberry___healthy",
28
+ "5": "Cherry_(including_sour)___Powdery_mildew",
29
+ "6": "Cherry_(including_sour)___healthy",
30
+ "7": "Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot",
31
+ "8": "Corn_(maize)___Common_rust_",
32
+ "9": "Corn_(maize)___Northern_Leaf_Blight",
33
+ "10": "Corn_(maize)___healthy",
34
+ "11": "Grape___Black_rot",
35
+ "12": "Grape___Esca_(Black_Measles)",
36
+ "13": "Grape___Leaf_blight_(Isariopsis_Leaf_Spot)",
37
+ "14": "Grape___healthy",
38
+ "15": "Orange___Haunglongbing_(Citrus_greening)",
39
+ "16": "Peach___Bacterial_spot",
40
+ "17": "Peach___healthy",
41
+ "18": "Pepper,_bell___Bacterial_spot",
42
+ "19": "Pepper,_bell___healthy",
43
+ "20": "Potato___Early_blight",
44
+ "21": "Potato___Late_blight",
45
+ "22": "Potato___healthy",
46
+ "23": "Raspberry___healthy",
47
+ "24": "Soybean___healthy",
48
+ "25": "Squash___Powdery_mildew",
49
+ "26": "Strawberry___Leaf_scorch",
50
+ "27": "Strawberry___healthy",
51
+ "28": "Tomato___Bacterial_spot",
52
+ "29": "Tomato___Early_blight",
53
+ "30": "Tomato___Late_blight",
54
+ "31": "Tomato___Leaf_Mold",
55
+ "32": "Tomato___Septoria_leaf_spot",
56
+ "33": "Tomato___Spider_mites Two-spotted_spider_mite",
57
+ "34": "Tomato___Target_Spot",
58
+ "35": "Tomato___Tomato_Yellow_Leaf_Curl_Virus",
59
+ "36": "Tomato___Tomato_mosaic_virus",
60
+ "37": "Tomato___healthy"
61
+ },
62
+ "label2id": {
63
+ "Apple___Apple_scab": 0,
64
+ "Apple___Black_rot": 1,
65
+ "Apple___Cedar_apple_rust": 2,
66
+ "Apple___healthy": 3,
67
+ "Blueberry___healthy": 4,
68
+ "Cherry_(including_sour)___Powdery_mildew": 5,
69
+ "Cherry_(including_sour)___healthy": 6,
70
+ "Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot": 7,
71
+ "Corn_(maize)___Common_rust_": 8,
72
+ "Corn_(maize)___Northern_Leaf_Blight": 9,
73
+ "Corn_(maize)___healthy": 10,
74
+ "Grape___Black_rot": 11,
75
+ "Grape___Esca_(Black_Measles)": 12,
76
+ "Grape___Leaf_blight_(Isariopsis_Leaf_Spot)": 13,
77
+ "Grape___healthy": 14,
78
+ "Orange___Haunglongbing_(Citrus_greening)": 15,
79
+ "Peach___Bacterial_spot": 16,
80
+ "Peach___healthy": 17,
81
+ "Pepper,_bell___Bacterial_spot": 18,
82
+ "Pepper,_bell___healthy": 19,
83
+ "Potato___Early_blight": 20,
84
+ "Potato___Late_blight": 21,
85
+ "Potato___healthy": 22,
86
+ "Raspberry___healthy": 23,
87
+ "Soybean___healthy": 24,
88
+ "Squash___Powdery_mildew": 25,
89
+ "Strawberry___Leaf_scorch": 26,
90
+ "Strawberry___healthy": 27,
91
+ "Tomato___Bacterial_spot": 28,
92
+ "Tomato___Early_blight": 29,
93
+ "Tomato___Late_blight": 30,
94
+ "Tomato___Leaf_Mold": 31,
95
+ "Tomato___Septoria_leaf_spot": 32,
96
+ "Tomato___Spider_mites Two-spotted_spider_mite": 33,
97
+ "Tomato___Target_Spot": 34,
98
+ "Tomato___Tomato_Yellow_Leaf_Curl_Virus": 35,
99
+ "Tomato___Tomato_mosaic_virus": 36,
100
+ "Tomato___healthy": 37
101
+ },
102
+ "layer_type": "bottleneck",
103
+ "model_type": "resnet",
104
+ "num_channels": 3,
105
+ "out_features": [
106
+ "stage4"
107
+ ],
108
+ "out_indices": [
109
+ 4
110
+ ],
111
+ "problem_type": "single_label_classification",
112
+ "stage_names": [
113
+ "stem",
114
+ "stage1",
115
+ "stage2",
116
+ "stage3",
117
+ "stage4"
118
+ ],
119
+ "transformers_version": "5.0.0",
120
+ "use_cache": false
121
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:404511dfb3cbc0c4cbcc5171f0e4aa4e56eb1dd0098bb46e3f32117736b98eba
3
+ size 94598072
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_pct": 0.875,
3
+ "data_format": "channels_first",
4
+ "do_normalize": true,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.485,
9
+ 0.456,
10
+ 0.406
11
+ ],
12
+ "image_processor_type": "ConvNextImageProcessorFast",
13
+ "image_std": [
14
+ 0.229,
15
+ 0.224,
16
+ 0.225
17
+ ],
18
+ "resample": 3,
19
+ "rescale_factor": 0.00392156862745098,
20
+ "size": {
21
+ "shortest_edge": 224
22
+ }
23
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a9de96feafcb47680a596b29a34250b6857e58fbe457dfa52ac28e6c25918fe1
3
+ size 5201