Nicole-M commited on
Commit
9045adc
·
verified ·
1 Parent(s): bdfcf66

SwinV2-fineTuned

Browse files
Files changed (5) hide show
  1. README.md +70 -0
  2. config.json +67 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +22 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: swinv2
3
+ tags:
4
+ - image-classification
5
+ - breast cancer
6
+ - generated_from_trainer
7
+ metrics:
8
+ - accuracy
9
+ - precision
10
+ - recall
11
+ - f1
12
+ model-index:
13
+ - name: swinV2-CBIS
14
+ results: []
15
+ ---
16
+
17
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
18
+ should probably proofread and complete it, then remove this comment. -->
19
+
20
+ # swinV2-CBIS
21
+
22
+ This model is a fine-tuned version of [swinv2](https://huggingface.co/swinv2) on the CBIS-DDSM dataset.
23
+ It achieves the following results on the evaluation set:
24
+ - Loss: 0.6876
25
+ - Accuracy: 0.6085
26
+ - Precision: 0.3702
27
+ - Recall: 0.6085
28
+ - F1: 0.4604
29
+
30
+ ## Model description
31
+
32
+ More information needed
33
+
34
+ ## Intended uses & limitations
35
+
36
+ More information needed
37
+
38
+ ## Training and evaluation data
39
+
40
+ More information needed
41
+
42
+ ## Training procedure
43
+
44
+ ### Training hyperparameters
45
+
46
+ The following hyperparameters were used during training:
47
+ - learning_rate: 3e-05
48
+ - train_batch_size: 8
49
+ - eval_batch_size: 8
50
+ - seed: 42
51
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
52
+ - lr_scheduler_type: linear
53
+ - num_epochs: 3
54
+ - mixed_precision_training: Native AMP
55
+
56
+ ### Training results
57
+
58
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
59
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
60
+ | 0.7205 | 1.0 | 165 | 0.6842 | 0.6085 | 0.3702 | 0.6085 | 0.4604 |
61
+ | 0.6924 | 2.0 | 330 | 0.6847 | 0.6085 | 0.3702 | 0.6085 | 0.4604 |
62
+ | 0.6867 | 3.0 | 495 | 0.6876 | 0.6085 | 0.3702 | 0.6085 | 0.4604 |
63
+
64
+
65
+ ### Framework versions
66
+
67
+ - Transformers 4.42.4
68
+ - Pytorch 2.3.1+cu121
69
+ - Datasets 2.21.0
70
+ - Tokenizers 0.19.1
config.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/swinv2-base-patch4-window8-256",
3
+ "architectures": [
4
+ "Swinv2ForImageClassification"
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": "Benign",
21
+ "1": "Malignant"
22
+ },
23
+ "image_size": 256,
24
+ "initializer_range": 0.02,
25
+ "label2id": {
26
+ "Benign": 0,
27
+ "Malignant": 1
28
+ },
29
+ "layer_norm_eps": 1e-05,
30
+ "mlp_ratio": 4.0,
31
+ "model_type": "swinv2",
32
+ "num_channels": 3,
33
+ "num_heads": [
34
+ 4,
35
+ 8,
36
+ 16,
37
+ 32
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
+ "pretrained_window_sizes": [
49
+ 0,
50
+ 0,
51
+ 0,
52
+ 0
53
+ ],
54
+ "problem_type": "single_label_classification",
55
+ "qkv_bias": true,
56
+ "stage_names": [
57
+ "stem",
58
+ "stage1",
59
+ "stage2",
60
+ "stage3",
61
+ "stage4"
62
+ ],
63
+ "torch_dtype": "float32",
64
+ "transformers_version": "4.42.4",
65
+ "use_absolute_embeddings": false,
66
+ "window_size": 8
67
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:830e05b68a75949d16b56c75b28639fb0fc7146f913dc605f4c41bbe75d01487
3
+ size 347645480
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": 256,
20
+ "width": 256
21
+ }
22
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60f903f899e17a465cda26640e1f42b6c2115e612a54108746d4d6284283deb3
3
+ size 5112