File size: 3,182 Bytes
7134147
 
 
 
 
b566365
 
 
7134147
 
 
 
 
 
 
 
 
 
 
 
b566365
7134147
 
 
 
 
 
 
3d9918f
7134147
 
 
 
 
51e2add
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7134147
 
b566365
7134147
3d9918f
 
7134147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e91e999
7134147
 
 
 
 
4f68889
7134147
 
 
 
 
3d9918f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7134147
 
 
 
 
 
 
 
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
---
library_name: transformers
license: apache-2.0
base_model: google/vit-base-patch16-224
tags:
- image-classification
- brain-tumor
- medical-imaging
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: vit-base-brain-tumor
  results:
  - task:
      name: Image Classification
      type: image-classification
    dataset:
      name: your-username/brain-tumor
      type: imagefolder
      config: default
      split: train
      args: default
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.8698884758364313
---

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

# clip-brain-tumor
This model uses the Zero-Shot model openai/clip-vit-large-patch14 to classify brain tumors in MRI scans — without any fine-tuning.

The classification is based on the following semantic labels:

“An MRI scan showing a brain tumor”

“An MRI scan showing a healthy brain”

The model was evaluated on an MRI dataset and achieved the following results:

- Accuracy: 0.8770
- Precision: 0.8853
- Recall: 0.8770

# vit-base-brain-tumor

This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the your-username/brain-tumor dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3678
- Accuracy: 0.8699

## 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: 2e-05
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 15

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 0.8264        | 1.0   | 135  | 0.6904          | 0.5709   |
| 0.6692        | 2.0   | 270  | 0.5918          | 0.7313   |
| 0.5584        | 3.0   | 405  | 0.5281          | 0.7836   |
| 0.4993        | 4.0   | 540  | 0.4851          | 0.8321   |
| 0.4554        | 5.0   | 675  | 0.4554          | 0.8321   |
| 0.4237        | 6.0   | 810  | 0.4345          | 0.8246   |
| 0.4035        | 7.0   | 945  | 0.4183          | 0.8246   |
| 0.3861        | 8.0   | 1080 | 0.4066          | 0.8321   |
| 0.3793        | 9.0   | 1215 | 0.3976          | 0.8433   |
| 0.3678        | 10.0  | 1350 | 0.3898          | 0.8433   |
| 0.3665        | 11.0  | 1485 | 0.3843          | 0.8433   |
| 0.3564        | 12.0  | 1620 | 0.3802          | 0.8433   |
| 0.3518        | 13.0  | 1755 | 0.3772          | 0.8470   |
| 0.3508        | 14.0  | 1890 | 0.3755          | 0.8470   |
| 0.3518        | 15.0  | 2025 | 0.3750          | 0.8470   |


### Framework versions

- Transformers 4.50.0
- Pytorch 2.6.0+cu124
- Datasets 3.4.1
- Tokenizers 0.21.1