rit0027 commited on
Commit
7066558
·
verified ·
1 Parent(s): 92ba206

SmartFarm_ResNet50 files

Browse files
Files changed (4) hide show
  1. README.md +81 -0
  2. config.json +120 -0
  3. preprocessor_config.json +23 -0
  4. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ datasets:
6
+ - imagefolder
7
+ metrics:
8
+ - accuracy
9
+ model-index:
10
+ - name: resnet-50-finetuned-eurosat
11
+ results:
12
+ - task:
13
+ name: Image Classification
14
+ type: image-classification
15
+ dataset:
16
+ name: imagefolder
17
+ type: imagefolder
18
+ config: default
19
+ split: validation
20
+ args: default
21
+ metrics:
22
+ - name: Accuracy
23
+ type: accuracy
24
+ value: 0.9641475073981334
25
+ ---
26
+
27
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
28
+ should probably proofread and complete it, then remove this comment. -->
29
+
30
+ # resnet-50-finetuned-eurosat
31
+
32
+ This model is a fine-tuned version of [microsoft/resnet-50](https://huggingface.co/microsoft/resnet-50) on the imagefolder dataset.
33
+ It achieves the following results on the evaluation set:
34
+ - Loss: 0.1382
35
+ - Accuracy: 0.9641
36
+
37
+ ## Model description
38
+
39
+ More information needed
40
+
41
+ ## Intended uses & limitations
42
+
43
+ More information needed
44
+
45
+ ## Training and evaluation data
46
+
47
+ More information needed
48
+
49
+ ## Training procedure
50
+
51
+ ### Training hyperparameters
52
+
53
+ The following hyperparameters were used during training:
54
+ - learning_rate: 5e-05
55
+ - train_batch_size: 32
56
+ - eval_batch_size: 32
57
+ - seed: 42
58
+ - gradient_accumulation_steps: 4
59
+ - total_train_batch_size: 128
60
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
61
+ - lr_scheduler_type: linear
62
+ - lr_scheduler_warmup_ratio: 0.1
63
+ - num_epochs: 5
64
+
65
+ ### Training results
66
+
67
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
68
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
69
+ | 0.2976 | 1.0 | 549 | 0.1450 | 0.9636 |
70
+ | 0.3388 | 2.0 | 1098 | 0.1382 | 0.9641 |
71
+ | 0.361 | 3.0 | 1647 | 0.1432 | 0.9632 |
72
+ | 0.3163 | 4.0 | 2197 | 0.1412 | 0.9640 |
73
+ | 0.3103 | 5.0 | 2745 | 0.1391 | 0.9639 |
74
+
75
+
76
+ ### Framework versions
77
+
78
+ - Transformers 4.28.1
79
+ - Pytorch 2.0.0+cu118
80
+ - Datasets 2.12.0
81
+ - Tokenizers 0.13.3
config.json ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/resnet-50",
3
+ "architectures": [
4
+ "ResNetForImageClassification"
5
+ ],
6
+ "depths": [
7
+ 3,
8
+ 4,
9
+ 6,
10
+ 3
11
+ ],
12
+ "downsample_in_first_stage": false,
13
+ "embedding_size": 64,
14
+ "hidden_act": "relu",
15
+ "hidden_sizes": [
16
+ 256,
17
+ 512,
18
+ 1024,
19
+ 2048
20
+ ],
21
+ "id2label": {
22
+ "0": "Apple___Apple_scab",
23
+ "1": "Apple___Black_rot",
24
+ "2": "Apple___Cedar_apple_rust",
25
+ "3": "Apple___healthy",
26
+ "4": "Blueberry___healthy",
27
+ "5": "Cherry_(including_sour)___Powdery_mildew",
28
+ "6": "Cherry_(including_sour)___healthy",
29
+ "7": "Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot",
30
+ "8": "Corn_(maize)___Common_rust_",
31
+ "9": "Corn_(maize)___Northern_Leaf_Blight",
32
+ "10": "Corn_(maize)___healthy",
33
+ "11": "Grape___Black_rot",
34
+ "12": "Grape___Esca_(Black_Measles)",
35
+ "13": "Grape___Leaf_blight_(Isariopsis_Leaf_Spot)",
36
+ "14": "Grape___healthy",
37
+ "15": "Orange___Haunglongbing_(Citrus_greening)",
38
+ "16": "Peach___Bacterial_spot",
39
+ "17": "Peach___healthy",
40
+ "18": "Pepper,_bell___Bacterial_spot",
41
+ "19": "Pepper,_bell___healthy",
42
+ "20": "Potato___Early_blight",
43
+ "21": "Potato___Late_blight",
44
+ "22": "Potato___healthy",
45
+ "23": "Raspberry___healthy",
46
+ "24": "Soybean___healthy",
47
+ "25": "Squash___Powdery_mildew",
48
+ "26": "Strawberry___Leaf_scorch",
49
+ "27": "Strawberry___healthy",
50
+ "28": "Tomato___Bacterial_spot",
51
+ "29": "Tomato___Early_blight",
52
+ "30": "Tomato___Late_blight",
53
+ "31": "Tomato___Leaf_Mold",
54
+ "32": "Tomato___Septoria_leaf_spot",
55
+ "33": "Tomato___Spider_mites Two-spotted_spider_mite",
56
+ "34": "Tomato___Target_Spot",
57
+ "35": "Tomato___Tomato_Yellow_Leaf_Curl_Virus",
58
+ "36": "Tomato___Tomato_mosaic_virus",
59
+ "37": "Tomato___healthy"
60
+ },
61
+ "label2id": {
62
+ "Apple___Apple_scab": 0,
63
+ "Apple___Black_rot": 1,
64
+ "Apple___Cedar_apple_rust": 2,
65
+ "Apple___healthy": 3,
66
+ "Blueberry___healthy": 4,
67
+ "Cherry_(including_sour)___Powdery_mildew": 5,
68
+ "Cherry_(including_sour)___healthy": 6,
69
+ "Corn_(maize)___Cercospora_leaf_spot Gray_leaf_spot": 7,
70
+ "Corn_(maize)___Common_rust_": 8,
71
+ "Corn_(maize)___Northern_Leaf_Blight": 9,
72
+ "Corn_(maize)___healthy": 10,
73
+ "Grape___Black_rot": 11,
74
+ "Grape___Esca_(Black_Measles)": 12,
75
+ "Grape___Leaf_blight_(Isariopsis_Leaf_Spot)": 13,
76
+ "Grape___healthy": 14,
77
+ "Orange___Haunglongbing_(Citrus_greening)": 15,
78
+ "Peach___Bacterial_spot": 16,
79
+ "Peach___healthy": 17,
80
+ "Pepper,_bell___Bacterial_spot": 18,
81
+ "Pepper,_bell___healthy": 19,
82
+ "Potato___Early_blight": 20,
83
+ "Potato___Late_blight": 21,
84
+ "Potato___healthy": 22,
85
+ "Raspberry___healthy": 23,
86
+ "Soybean___healthy": 24,
87
+ "Squash___Powdery_mildew": 25,
88
+ "Strawberry___Leaf_scorch": 26,
89
+ "Strawberry___healthy": 27,
90
+ "Tomato___Bacterial_spot": 28,
91
+ "Tomato___Early_blight": 29,
92
+ "Tomato___Late_blight": 30,
93
+ "Tomato___Leaf_Mold": 31,
94
+ "Tomato___Septoria_leaf_spot": 32,
95
+ "Tomato___Spider_mites Two-spotted_spider_mite": 33,
96
+ "Tomato___Target_Spot": 34,
97
+ "Tomato___Tomato_Yellow_Leaf_Curl_Virus": 35,
98
+ "Tomato___Tomato_mosaic_virus": 36,
99
+ "Tomato___healthy": 37
100
+ },
101
+ "layer_type": "bottleneck",
102
+ "model_type": "resnet",
103
+ "num_channels": 3,
104
+ "out_features": [
105
+ "stage4"
106
+ ],
107
+ "out_indices": [
108
+ 4
109
+ ],
110
+ "problem_type": "single_label_classification",
111
+ "stage_names": [
112
+ "stem",
113
+ "stage1",
114
+ "stage2",
115
+ "stage3",
116
+ "stage4"
117
+ ],
118
+ "torch_dtype": "float32",
119
+ "transformers_version": "4.28.1"
120
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_pct": 0.875,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "feature_extractor_type": "ConvNextFeatureExtractor",
7
+ "image_mean": [
8
+ 0.485,
9
+ 0.456,
10
+ 0.406
11
+ ],
12
+ "image_processor_type": "ConvNextFeatureExtractor",
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
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b47fab127cfdc98d772ba745e74e9fefac9bab6b7df8f2593064f2098a8cc1f7
3
+ size 94670029