zypchn commited on
Commit
f404720
·
verified ·
1 Parent(s): 811ac57

zypchn/model_0-D2-SW-Tuned

Browse files
Files changed (5) hide show
  1. README.md +79 -0
  2. config.json +59 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +33 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: microsoft/swin-tiny-patch4-window7-224
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - accuracy
9
+ - precision
10
+ - f1
11
+ model-index:
12
+ - name: model_0-D2-SW-Tuned
13
+ results: []
14
+ ---
15
+
16
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
17
+ should probably proofread and complete it, then remove this comment. -->
18
+
19
+ # model_0-D2-SW-Tuned
20
+
21
+ This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on an unknown dataset.
22
+ It achieves the following results on the evaluation set:
23
+ - Loss: 0.1783
24
+ - Accuracy: 0.9889
25
+ - Precision: 0.9889
26
+ - Sensitivity: 0.9667
27
+ - Specificity: 0.9933
28
+ - F1: 0.9889
29
+ - Auc: 0.9991
30
+ - Mcc: 0.96
31
+ - J Stat: 0.96
32
+ - Confusion Matrix: [[149, 1], [1, 29]]
33
+
34
+ ## Model description
35
+
36
+ More information needed
37
+
38
+ ## Intended uses & limitations
39
+
40
+ More information needed
41
+
42
+ ## Training and evaluation data
43
+
44
+ More information needed
45
+
46
+ ## Training procedure
47
+
48
+ ### Training hyperparameters
49
+
50
+ The following hyperparameters were used during training:
51
+ - learning_rate: 4.286661471431606e-05
52
+ - train_batch_size: 4
53
+ - eval_batch_size: 4
54
+ - seed: 42
55
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
56
+ - lr_scheduler_type: linear
57
+ - lr_scheduler_warmup_ratio: 0.07159086635599052
58
+ - num_epochs: 7
59
+ - label_smoothing_factor: 0.0713211794743841
60
+
61
+ ### Training results
62
+
63
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Sensitivity | Specificity | F1 | Auc | Mcc | J Stat | Confusion Matrix |
64
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:-----------:|:-----------:|:------:|:------:|:------:|:------:|:-------------------:|
65
+ | 0.2816 | 1.0 | 376 | 0.2185 | 0.9722 | 0.9727 | 0.9333 | 0.98 | 0.9724 | 0.9929 | 0.9015 | 0.9133 | [[147, 3], [2, 28]] |
66
+ | 0.2998 | 2.0 | 752 | 0.2313 | 0.9611 | 0.9607 | 0.8667 | 0.98 | 0.9608 | 0.9947 | 0.8583 | 0.8467 | [[147, 3], [4, 26]] |
67
+ | 0.1991 | 3.0 | 1128 | 0.2396 | 0.9667 | 0.9662 | 0.8667 | 0.9867 | 0.9662 | 0.9951 | 0.8775 | 0.8533 | [[148, 2], [4, 26]] |
68
+ | 0.2611 | 4.0 | 1504 | 0.1923 | 0.9833 | 0.9837 | 0.9667 | 0.9867 | 0.9834 | 0.998 | 0.9410 | 0.9533 | [[148, 2], [1, 29]] |
69
+ | 0.2044 | 5.0 | 1880 | 0.2105 | 0.9722 | 0.9741 | 0.9667 | 0.9733 | 0.9727 | 0.9989 | 0.9054 | 0.94 | [[146, 4], [1, 29]] |
70
+ | 0.207 | 6.0 | 2256 | 0.1922 | 0.9833 | 0.9832 | 0.9333 | 0.9933 | 0.9832 | 0.9991 | 0.9394 | 0.9267 | [[149, 1], [2, 28]] |
71
+ | 0.1677 | 7.0 | 2632 | 0.1783 | 0.9889 | 0.9889 | 0.9667 | 0.9933 | 0.9889 | 0.9991 | 0.96 | 0.96 | [[149, 1], [1, 29]] |
72
+
73
+
74
+ ### Framework versions
75
+
76
+ - Transformers 4.57.1
77
+ - Pytorch 2.6.0+cu124
78
+ - Datasets 4.4.1
79
+ - Tokenizers 0.22.1
config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "SwinForImageClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.0,
6
+ "depths": [
7
+ 2,
8
+ 2,
9
+ 6,
10
+ 2
11
+ ],
12
+ "drop_path_rate": 0.1,
13
+ "dtype": "float32",
14
+ "embed_dim": 96,
15
+ "encoder_stride": 32,
16
+ "hidden_act": "gelu",
17
+ "hidden_dropout_prob": 0.0,
18
+ "hidden_size": 768,
19
+ "id2label": {
20
+ "0": "negative",
21
+ "1": "positive"
22
+ },
23
+ "image_size": 224,
24
+ "initializer_range": 0.02,
25
+ "label2id": {
26
+ "negative": "0",
27
+ "positive": "1"
28
+ },
29
+ "layer_norm_eps": 1e-05,
30
+ "mlp_ratio": 4.0,
31
+ "model_type": "swin",
32
+ "num_channels": 3,
33
+ "num_heads": [
34
+ 3,
35
+ 6,
36
+ 12,
37
+ 24
38
+ ],
39
+ "num_layers": 4,
40
+ "out_features": [
41
+ "stage4"
42
+ ],
43
+ "out_indices": [
44
+ 4
45
+ ],
46
+ "patch_size": 4,
47
+ "path_norm": true,
48
+ "qkv_bias": true,
49
+ "stage_names": [
50
+ "stem",
51
+ "stage1",
52
+ "stage2",
53
+ "stage3",
54
+ "stage4"
55
+ ],
56
+ "transformers_version": "4.57.1",
57
+ "use_absolute_embeddings": false,
58
+ "window_size": 7
59
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6999e3ae1fc3fe2c126b6643da016fc58270ed2cace4b05f5713babcd10d247d
3
+ size 110342832
preprocessor_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "do_center_crop": null,
8
+ "do_convert_rgb": null,
9
+ "do_normalize": true,
10
+ "do_pad": null,
11
+ "do_rescale": true,
12
+ "do_resize": true,
13
+ "image_mean": [
14
+ 0.485,
15
+ 0.456,
16
+ 0.406
17
+ ],
18
+ "image_processor_type": "ViTImageProcessorFast",
19
+ "image_std": [
20
+ 0.229,
21
+ 0.224,
22
+ 0.225
23
+ ],
24
+ "input_data_format": null,
25
+ "pad_size": null,
26
+ "resample": 3,
27
+ "rescale_factor": 0.00392156862745098,
28
+ "return_tensors": null,
29
+ "size": {
30
+ "height": 224,
31
+ "width": 224
32
+ }
33
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9424db0b1f98d103d9ac74e427fb8d3655a306af95832965ced9c20b3277c393
3
+ size 5432