phuong-tk-nguyen commited on
Commit
8ba25ec
1 Parent(s): e40dcc3

Model save

Browse files
Files changed (5) hide show
  1. README.md +84 -0
  2. config.json +77 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +22 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: microsoft/swin-base-patch4-window7-224-in22k
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - imagefolder
8
+ metrics:
9
+ - accuracy
10
+ model-index:
11
+ - name: swin-base-patch4-window7-224-in22k-newly-trained
12
+ results:
13
+ - task:
14
+ name: Image Classification
15
+ type: image-classification
16
+ dataset:
17
+ name: imagefolder
18
+ type: imagefolder
19
+ config: default
20
+ split: train
21
+ args: default
22
+ metrics:
23
+ - name: Accuracy
24
+ type: accuracy
25
+ value: 0.959
26
+ ---
27
+
28
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
29
+ should probably proofread and complete it, then remove this comment. -->
30
+
31
+ # swin-base-patch4-window7-224-in22k-newly-trained
32
+
33
+ This model is a fine-tuned version of [microsoft/swin-base-patch4-window7-224-in22k](https://huggingface.co/microsoft/swin-base-patch4-window7-224-in22k) on the imagefolder dataset.
34
+ It achieves the following results on the evaluation set:
35
+ - Loss: 0.1335
36
+ - Accuracy: 0.959
37
+
38
+ ## Model description
39
+
40
+ More information needed
41
+
42
+ ## Intended uses & limitations
43
+
44
+ More information needed
45
+
46
+ ## Training and evaluation data
47
+
48
+ More information needed
49
+
50
+ ## Training procedure
51
+
52
+ ### Training hyperparameters
53
+
54
+ The following hyperparameters were used during training:
55
+ - learning_rate: 5e-05
56
+ - train_batch_size: 32
57
+ - eval_batch_size: 32
58
+ - seed: 42
59
+ - gradient_accumulation_steps: 4
60
+ - total_train_batch_size: 128
61
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
62
+ - lr_scheduler_type: linear
63
+ - lr_scheduler_warmup_ratio: 0.1
64
+ - num_epochs: 1
65
+
66
+ ### Training results
67
+
68
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
69
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
70
+ | 2.2459 | 0.14 | 10 | 1.7346 | 0.575 |
71
+ | 1.4338 | 0.28 | 20 | 0.7222 | 0.841 |
72
+ | 0.8059 | 0.43 | 30 | 0.3252 | 0.915 |
73
+ | 0.5772 | 0.57 | 40 | 0.2071 | 0.942 |
74
+ | 0.5599 | 0.71 | 50 | 0.1553 | 0.958 |
75
+ | 0.4473 | 0.85 | 60 | 0.1373 | 0.958 |
76
+ | 0.4292 | 0.99 | 70 | 0.1335 | 0.959 |
77
+
78
+
79
+ ### Framework versions
80
+
81
+ - Transformers 4.35.0
82
+ - Pytorch 2.1.1
83
+ - Datasets 2.14.6
84
+ - Tokenizers 0.14.1
config.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/swin-base-patch4-window7-224-in22k",
3
+ "architectures": [
4
+ "SwinForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "depths": [
8
+ 2,
9
+ 2,
10
+ 18,
11
+ 2
12
+ ],
13
+ "drop_path_rate": 0.1,
14
+ "embed_dim": 128,
15
+ "encoder_stride": 32,
16
+ "hidden_act": "gelu",
17
+ "hidden_dropout_prob": 0.0,
18
+ "hidden_size": 1024,
19
+ "id2label": {
20
+ "0": "Airplane",
21
+ "1": "Automobile",
22
+ "2": "Bird",
23
+ "3": "Cat",
24
+ "4": "Deer",
25
+ "5": "Dog",
26
+ "6": "Frog",
27
+ "7": "Horse",
28
+ "8": "Ship",
29
+ "9": "Truck"
30
+ },
31
+ "image_size": 224,
32
+ "initializer_range": 0.02,
33
+ "label2id": {
34
+ "Airplane": 0,
35
+ "Automobile": 1,
36
+ "Bird": 2,
37
+ "Cat": 3,
38
+ "Deer": 4,
39
+ "Dog": 5,
40
+ "Frog": 6,
41
+ "Horse": 7,
42
+ "Ship": 8,
43
+ "Truck": 9
44
+ },
45
+ "layer_norm_eps": 1e-05,
46
+ "mlp_ratio": 4.0,
47
+ "model_type": "swin",
48
+ "num_channels": 3,
49
+ "num_heads": [
50
+ 4,
51
+ 8,
52
+ 16,
53
+ 32
54
+ ],
55
+ "num_layers": 4,
56
+ "out_features": [
57
+ "stage4"
58
+ ],
59
+ "out_indices": [
60
+ 4
61
+ ],
62
+ "patch_size": 4,
63
+ "path_norm": true,
64
+ "problem_type": "single_label_classification",
65
+ "qkv_bias": true,
66
+ "stage_names": [
67
+ "stem",
68
+ "stage1",
69
+ "stage2",
70
+ "stage3",
71
+ "stage4"
72
+ ],
73
+ "torch_dtype": "float32",
74
+ "transformers_version": "4.35.0",
75
+ "use_absolute_embeddings": false,
76
+ "window_size": 7
77
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a35fa56abb77d41c811e0f5e739755f8f88e7d8ab5a443af866c4f82ad47fd0
3
+ size 347531616
preprocessor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": true,
5
+ "image_mean": [
6
+ 0.485,
7
+ 0.456,
8
+ 0.406
9
+ ],
10
+ "image_processor_type": "ViTImageProcessor",
11
+ "image_std": [
12
+ 0.229,
13
+ 0.224,
14
+ 0.225
15
+ ],
16
+ "resample": 3,
17
+ "rescale_factor": 0.00392156862745098,
18
+ "size": {
19
+ "height": 224,
20
+ "width": 224
21
+ }
22
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2453891424f792586c48fa3cf58fda0f31f7072adfa92f859789002aaa4a2600
3
+ size 4600