Heem2 commited on
Commit
68f1aae
·
verified ·
1 Parent(s): 4cf0d21

Upload 5 files

Browse files
Files changed (5) hide show
  1. README.md +79 -0
  2. config.json +32 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +22 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: google/vit-base-patch16-224-in21k
4
+ tags:
5
+ - generated_from_trainer
6
+ metrics:
7
+ - accuracy
8
+ model-index:
9
+ - name: Melanoma-Cancer-Image-Classification
10
+ results: []
11
+ ---
12
+
13
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
+ should probably proofread and complete it, then remove this comment. -->
15
+
16
+ # Melanoma-Cancer-Image-Classification
17
+
18
+ This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on an unknown dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.1954
21
+ - Accuracy: 0.9395
22
+
23
+ ## Model description
24
+
25
+ More information needed
26
+
27
+ ## Intended uses & limitations
28
+
29
+ More information needed
30
+
31
+ ## Training and evaluation data
32
+
33
+ More information needed
34
+
35
+ ## Training procedure
36
+
37
+ ### Training hyperparameters
38
+
39
+ The following hyperparameters were used during training:
40
+ - learning_rate: 3e-05
41
+ - train_batch_size: 32
42
+ - eval_batch_size: 32
43
+ - seed: 42
44
+ - gradient_accumulation_steps: 4
45
+ - total_train_batch_size: 128
46
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
47
+ - lr_scheduler_type: linear
48
+ - lr_scheduler_warmup_ratio: 0.1
49
+ - num_epochs: 16
50
+ - mixed_precision_training: Native AMP
51
+
52
+ ### Training results
53
+
54
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
55
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
56
+ | 0.5451 | 0.99 | 68 | 0.2960 | 0.8936 |
57
+ | 0.2488 | 1.99 | 137 | 0.2254 | 0.9105 |
58
+ | 0.1986 | 3.0 | 206 | 0.1913 | 0.9282 |
59
+ | 0.1714 | 4.0 | 275 | 0.1906 | 0.9264 |
60
+ | 0.1576 | 4.99 | 343 | 0.1825 | 0.9323 |
61
+ | 0.1359 | 5.99 | 412 | 0.1973 | 0.9318 |
62
+ | 0.1193 | 7.0 | 481 | 0.1756 | 0.9368 |
63
+ | 0.1062 | 8.0 | 550 | 0.1743 | 0.9382 |
64
+ | 0.0983 | 8.99 | 618 | 0.1885 | 0.9395 |
65
+ | 0.0797 | 9.99 | 687 | 0.1931 | 0.9309 |
66
+ | 0.0698 | 11.0 | 756 | 0.1895 | 0.9359 |
67
+ | 0.0657 | 12.0 | 825 | 0.1861 | 0.9368 |
68
+ | 0.0587 | 12.99 | 893 | 0.1837 | 0.9414 |
69
+ | 0.056 | 13.99 | 962 | 0.1936 | 0.9377 |
70
+ | 0.0592 | 15.0 | 1031 | 0.1958 | 0.935 |
71
+ | 0.0508 | 15.83 | 1088 | 0.1954 | 0.9395 |
72
+
73
+
74
+ ### Framework versions
75
+
76
+ - Transformers 4.38.2
77
+ - Pytorch 2.1.2
78
+ - Datasets 2.18.0
79
+ - Tokenizers 0.15.2
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "google/vit-base-patch16-224-in21k",
3
+ "architectures": [
4
+ "ViTForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "encoder_stride": 16,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.0,
10
+ "hidden_size": 768,
11
+ "id2label": {
12
+ "0": "Benign",
13
+ "1": "Malignant"
14
+ },
15
+ "image_size": 224,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "Benign": "0",
20
+ "Malignant": "1"
21
+ },
22
+ "layer_norm_eps": 1e-12,
23
+ "model_type": "vit",
24
+ "num_attention_heads": 12,
25
+ "num_channels": 3,
26
+ "num_hidden_layers": 12,
27
+ "patch_size": 16,
28
+ "problem_type": "single_label_classification",
29
+ "qkv_bias": true,
30
+ "torch_dtype": "float32",
31
+ "transformers_version": "4.38.2"
32
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:416d6a2619b2a44197037a064c4ae0dbfa10f0637d0c4fc2cd9c9b8ca257ff8b
3
+ size 343223968
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.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_processor_type": "ViTImageProcessor",
11
+ "image_std": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "resample": 2,
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:6224f30bd2e471557cef37c5e25e12deacb59883e48232c24b6f70628bed05d7
3
+ size 4920