File size: 12,290 Bytes
bf22769 953fe43 bf22769 953fe43 bf22769 953fe43 bf22769 953fe43 bf22769 953fe43 bf22769 953fe43 bf22769 953fe43 bf22769 953fe43 bf22769 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
---
license: apache-2.0
base_model: google/vit-base-patch16-224-in21k
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
- f1
- recall
- precision
model-index:
- name: vit-base-patch16-224-in21k_covid_19_ct_scans
results:
- task:
name: Image Classification
type: image-classification
dataset:
name: imagefolder
type: imagefolder
config: default
split: train
args: default
metrics:
- name: Accuracy
type: accuracy
value: 0.8887841658812441
- name: F1
type: f1
value: 0.7572553125484722
- name: Recall
type: recall
value: 0.9729119638826185
- name: Precision
type: precision
value: 0.9016736401673641
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# vit-base-patch16-224-in21k_covid_19_ct_scans
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 1.7287
- Accuracy: 0.8888
- F1: 0.7573
- Auc: 0.7179
- Recall: 0.9729
- Precision: 0.9017
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 100
### Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Auc | Recall | Precision |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|:------:|:------:|:------:|:---------:|
| 0.768 | 1.0 | 266 | 0.4546 | 0.8351 | 0.4551 | 0.5 | 1.0 | 0.8351 |
| 0.4516 | 2.0 | 532 | 0.4498 | 0.8351 | 0.4551 | 0.5 | 1.0 | 0.8351 |
| 0.4516 | 3.0 | 798 | 0.4492 | 0.8351 | 0.4551 | 0.5 | 1.0 | 0.8351 |
| 0.4521 | 4.0 | 1064 | 0.4486 | 0.8351 | 0.4551 | 0.5 | 1.0 | 0.8351 |
| 0.4521 | 5.0 | 1330 | 0.4457 | 0.8351 | 0.4551 | 0.5 | 1.0 | 0.8351 |
| 0.4415 | 6.0 | 1596 | 0.4422 | 0.8351 | 0.4551 | 0.5 | 1.0 | 0.8351 |
| 0.4415 | 7.0 | 1862 | 0.4249 | 0.8351 | 0.4551 | 0.5 | 1.0 | 0.8351 |
| 0.4344 | 8.0 | 2128 | 0.4644 | 0.8351 | 0.4966 | 0.5183 | 0.9910 | 0.8402 |
| 0.4344 | 9.0 | 2394 | 0.4209 | 0.8407 | 0.5272 | 0.5355 | 0.9910 | 0.8450 |
| 0.3848 | 10.0 | 2660 | 0.4336 | 0.8030 | 0.6572 | 0.6642 | 0.8713 | 0.8904 |
| 0.3848 | 11.0 | 2926 | 0.4307 | 0.8407 | 0.6595 | 0.6387 | 0.9402 | 0.8778 |
| 0.2882 | 12.0 | 3192 | 0.5094 | 0.8219 | 0.6913 | 0.7007 | 0.8815 | 0.9029 |
| 0.2882 | 13.0 | 3458 | 0.4620 | 0.8520 | 0.6637 | 0.6363 | 0.9582 | 0.8762 |
| 0.1654 | 14.0 | 3724 | 0.5891 | 0.8351 | 0.7142 | 0.7247 | 0.8894 | 0.9110 |
| 0.1654 | 15.0 | 3990 | 0.5602 | 0.8417 | 0.6940 | 0.6828 | 0.9199 | 0.8936 |
| 0.0868 | 16.0 | 4256 | 0.5928 | 0.8690 | 0.7114 | 0.6785 | 0.9628 | 0.8895 |
| 0.045 | 17.0 | 4522 | 0.6154 | 0.8633 | 0.7268 | 0.7072 | 0.9402 | 0.9005 |
| 0.045 | 18.0 | 4788 | 0.6358 | 0.8680 | 0.7370 | 0.7169 | 0.9424 | 0.9037 |
| 0.021 | 19.0 | 5054 | 0.8247 | 0.8530 | 0.7379 | 0.7423 | 0.9074 | 0.9157 |
| 0.021 | 20.0 | 5320 | 0.9930 | 0.8473 | 0.7229 | 0.7229 | 0.9086 | 0.9086 |
| 0.0136 | 21.0 | 5586 | 0.5601 | 0.8652 | 0.7262 | 0.7038 | 0.9447 | 0.8990 |
| 0.0136 | 22.0 | 5852 | 0.6475 | 0.8699 | 0.6935 | 0.6562 | 0.9752 | 0.8816 |
| 0.0464 | 23.0 | 6118 | 0.5767 | 0.8567 | 0.7273 | 0.7170 | 0.9255 | 0.9051 |
| 0.0464 | 24.0 | 6384 | 0.7394 | 0.8501 | 0.7369 | 0.7452 | 0.9018 | 0.9173 |
| 0.0438 | 25.0 | 6650 | 0.7622 | 0.8680 | 0.6781 | 0.6413 | 0.9797 | 0.8768 |
| 0.0438 | 26.0 | 6916 | 0.7617 | 0.8831 | 0.7509 | 0.7168 | 0.9650 | 0.9019 |
| 0.0126 | 27.0 | 7182 | 0.8841 | 0.8624 | 0.7354 | 0.7227 | 0.9312 | 0.9066 |
| 0.0126 | 28.0 | 7448 | 0.7538 | 0.8784 | 0.7544 | 0.7300 | 0.9515 | 0.9074 |
| 0.016 | 29.0 | 7714 | 0.7106 | 0.8718 | 0.6709 | 0.6321 | 0.9898 | 0.8735 |
| 0.016 | 30.0 | 7980 | 0.6112 | 0.8756 | 0.7251 | 0.6893 | 0.9673 | 0.8927 |
| 0.0384 | 31.0 | 8246 | 0.5990 | 0.8784 | 0.7271 | 0.6887 | 0.9718 | 0.8922 |
| 0.0276 | 32.0 | 8512 | 0.6617 | 0.8850 | 0.7411 | 0.6996 | 0.9763 | 0.8954 |
| 0.0276 | 33.0 | 8778 | 0.7069 | 0.8907 | 0.7599 | 0.7190 | 0.9752 | 0.9019 |
| 0.0109 | 34.0 | 9044 | 0.8042 | 0.8746 | 0.6974 | 0.6567 | 0.9819 | 0.8815 |
| 0.0109 | 35.0 | 9310 | 0.7706 | 0.8831 | 0.7369 | 0.6962 | 0.9752 | 0.8944 |
| 0.0028 | 36.0 | 9576 | 0.8394 | 0.8869 | 0.7516 | 0.7122 | 0.9729 | 0.8998 |
| 0.0028 | 37.0 | 9842 | 0.8954 | 0.8850 | 0.7475 | 0.7087 | 0.9718 | 0.8987 |
| 0.0076 | 38.0 | 10108 | 0.9389 | 0.8850 | 0.7475 | 0.7087 | 0.9718 | 0.8987 |
| 0.0076 | 39.0 | 10374 | 0.9697 | 0.8850 | 0.7475 | 0.7087 | 0.9718 | 0.8987 |
| 0.0001 | 40.0 | 10640 | 0.9954 | 0.8850 | 0.7475 | 0.7087 | 0.9718 | 0.8987 |
| 0.0001 | 41.0 | 10906 | 1.0169 | 0.8850 | 0.7475 | 0.7087 | 0.9718 | 0.8987 |
| 0.0 | 42.0 | 11172 | 1.0381 | 0.8860 | 0.7488 | 0.7093 | 0.9729 | 0.8989 |
| 0.0 | 43.0 | 11438 | 1.0582 | 0.8860 | 0.7488 | 0.7093 | 0.9729 | 0.8989 |
| 0.0 | 44.0 | 11704 | 1.0763 | 0.8860 | 0.7488 | 0.7093 | 0.9729 | 0.8989 |
| 0.0 | 45.0 | 11970 | 1.0937 | 0.8860 | 0.7488 | 0.7093 | 0.9729 | 0.8989 |
| 0.0 | 46.0 | 12236 | 1.1095 | 0.8878 | 0.7545 | 0.7150 | 0.9729 | 0.9007 |
| 0.0 | 47.0 | 12502 | 1.1263 | 0.8878 | 0.7545 | 0.7150 | 0.9729 | 0.9007 |
| 0.0 | 48.0 | 12768 | 1.1427 | 0.8878 | 0.7545 | 0.7150 | 0.9729 | 0.9007 |
| 0.0 | 49.0 | 13034 | 1.1587 | 0.8878 | 0.7545 | 0.7150 | 0.9729 | 0.9007 |
| 0.0 | 50.0 | 13300 | 1.1745 | 0.8878 | 0.7545 | 0.7150 | 0.9729 | 0.9007 |
| 0.0 | 51.0 | 13566 | 1.1901 | 0.8878 | 0.7545 | 0.7150 | 0.9729 | 0.9007 |
| 0.0 | 52.0 | 13832 | 1.2052 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 53.0 | 14098 | 1.2201 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 54.0 | 14364 | 1.2350 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 55.0 | 14630 | 1.2497 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 56.0 | 14896 | 1.2641 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 57.0 | 15162 | 1.2785 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 58.0 | 15428 | 1.2925 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 59.0 | 15694 | 1.3068 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 60.0 | 15960 | 1.3207 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 61.0 | 16226 | 1.3346 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 62.0 | 16492 | 1.3485 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 63.0 | 16758 | 1.3622 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 64.0 | 17024 | 1.3758 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 65.0 | 17290 | 1.3893 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 66.0 | 17556 | 1.4029 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 67.0 | 17822 | 1.4166 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 68.0 | 18088 | 1.4298 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 69.0 | 18354 | 1.4431 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 70.0 | 18620 | 1.4566 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 71.0 | 18886 | 1.4695 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 72.0 | 19152 | 1.4824 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 73.0 | 19418 | 1.4950 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 74.0 | 19684 | 1.5076 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 75.0 | 19950 | 1.5201 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 76.0 | 20216 | 1.5321 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 77.0 | 20482 | 1.5441 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 78.0 | 20748 | 1.5564 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 79.0 | 21014 | 1.5691 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 80.0 | 21280 | 1.5800 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 81.0 | 21546 | 1.5910 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 82.0 | 21812 | 1.6021 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 83.0 | 22078 | 1.6133 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 84.0 | 22344 | 1.6244 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 85.0 | 22610 | 1.6357 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 86.0 | 22876 | 1.6468 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 87.0 | 23142 | 1.6580 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 88.0 | 23408 | 1.6694 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 89.0 | 23674 | 1.6806 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 90.0 | 23940 | 1.6876 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 91.0 | 24206 | 1.6938 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 92.0 | 24472 | 1.6996 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 93.0 | 24738 | 1.7051 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 94.0 | 25004 | 1.7104 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 95.0 | 25270 | 1.7152 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 96.0 | 25536 | 1.7195 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 97.0 | 25802 | 1.7232 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 98.0 | 26068 | 1.7260 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 99.0 | 26334 | 1.7280 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
| 0.0 | 100.0 | 26600 | 1.7287 | 0.8888 | 0.7573 | 0.7179 | 0.9729 | 0.9017 |
### Framework versions
- Transformers 4.41.1
- Pytorch 2.0.0+cu117
- Datasets 2.19.1
- Tokenizers 0.19.1
|