File size: 5,374 Bytes
4916925
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---

license: apache-2.0
base_model: google/vit-base-patch16-224-in21k
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
- f1
- precision
- recall
model-index:
- name: vit-base-patch16-224-in21k-bridgedefectVIT15
  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:
        accuracy: 0.9573153608536927
    - name: F1
      type: f1
      value:
        f1: 0.9566147291413047
    - name: Precision
      type: precision
      value:
        precision: 0.9591127716274309
    - name: Recall
      type: recall
      value:
        recall: 0.9565472623176632
---


<!-- 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-bridgedefectVIT15

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: 0.2402
- Accuracy: {'accuracy': 0.9573153608536927}
- F1: {'f1': 0.9566147291413047}
- Precision: {'precision': 0.9591127716274309}
- Recall: {'recall': 0.9565472623176632}

## 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: 5e-05

- train_batch_size: 2

- eval_batch_size: 2

- seed: 42

- gradient_accumulation_steps: 4

- total_train_batch_size: 8
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1

- num_epochs: 15

### Training results

| Training Loss | Epoch | Step  | Validation Loss | Accuracy                         | F1                         | Precision                         | Recall                         |
|:-------------:|:-----:|:-----:|:---------------:|:--------------------------------:|:--------------------------:|:---------------------------------:|:------------------------------:|
| 0.3548        | 1.0   | 1780  | 0.2848          | {'accuracy': 0.9118225217635496} | {'f1': 0.912598515170384}  | {'precision': 0.913326374297146}  | {'recall': 0.9157022464716918} |
| 0.1718        | 2.0   | 3560  | 0.3435          | {'accuracy': 0.9005897219882055} | {'f1': 0.9021520907258462} | {'precision': 0.9071588887385811} | {'recall': 0.9088734326741875} |
| 0.1956        | 3.0   | 5340  | 0.2290          | {'accuracy': 0.9337264813254704} | {'f1': 0.9345043308561282} | {'precision': 0.9371641968965463} | {'recall': 0.9353444695340449} |
| 0.1589        | 4.0   | 7120  | 0.3518          | {'accuracy': 0.925582701488346}  | {'f1': 0.9240312800580016} | {'precision': 0.9310407182465765} | {'recall': 0.9241275251443595} |
| 0.1076        | 5.0   | 8900  | 0.4017          | {'accuracy': 0.9188430216231396} | {'f1': 0.9170326424426785} | {'precision': 0.923800610078333}  | {'recall': 0.9181896594596475} |
| 0.0895        | 6.0   | 10680 | 0.2950          | {'accuracy': 0.938219601235608}  | {'f1': 0.9380460882172743} | {'precision': 0.9406510771971466} | {'recall': 0.9398150744796098} |
| 0.0833        | 7.0   | 12460 | 0.1882          | {'accuracy': 0.9559112608817748} | {'f1': 0.9553785330080078} | {'precision': 0.957564211420095}  | {'recall': 0.9550045684543612} |
| 0.034         | 8.0   | 14240 | 0.3222          | {'accuracy': 0.9401853411962932} | {'f1': 0.9401162584753809} | {'precision': 0.944463542451817}  | {'recall': 0.9410746120960137} |
| 0.1117        | 9.0   | 16020 | 0.3084          | {'accuracy': 0.9401853411962932} | {'f1': 0.9389336455514373} | {'precision': 0.945493350000876}  | {'recall': 0.9374486305327216} |
| 0.2057        | 10.0  | 17800 | 0.3612          | {'accuracy': 0.9348497613030048} | {'f1': 0.9343390020827073} | {'precision': 0.939876035403298}  | {'recall': 0.9348316142752356} |
| 0.1           | 11.0  | 19580 | 0.2284          | {'accuracy': 0.9553496208930076} | {'f1': 0.9540937018628736} | {'precision': 0.9563364479044711} | {'recall': 0.9537814730817218} |
| 0.0531        | 12.0  | 21360 | 0.2393          | {'accuracy': 0.9528222409435552} | {'f1': 0.9517895350619009} | {'precision': 0.955245168398952}  | {'recall': 0.9514588091149371} |
| 0.0597        | 13.0  | 23140 | 0.2695          | {'accuracy': 0.9519797809604044} | {'f1': 0.9513321647748849} | {'precision': 0.9541412213348108} | {'recall': 0.9515688542696423} |
| 0.0482        | 14.0  | 24920 | 0.2403          | {'accuracy': 0.9567537208649256} | {'f1': 0.9560207781245073} | {'precision': 0.9590114685856663} | {'recall': 0.9557731012948057} |
| 0.0019        | 15.0  | 26700 | 0.2402          | {'accuracy': 0.9573153608536927} | {'f1': 0.9566147291413047} | {'precision': 0.9591127716274309} | {'recall': 0.9565472623176632} |


### Framework versions

- Transformers 4.37.2
- Pytorch 2.1.0
- Datasets 2.17.1
- Tokenizers 0.15.2