Image Classification
Transformers
TensorBoard
Safetensors
vit
brain-tumor
medical-imaging
Generated from Trainer
Eval Results (legacy)
Instructions to use Tharsana/vit-base-brain-tumor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tharsana/vit-base-brain-tumor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Tharsana/vit-base-brain-tumor") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("Tharsana/vit-base-brain-tumor") model = AutoModelForImageClassification.from_pretrained("Tharsana/vit-base-brain-tumor", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model save
Browse files
README.md
CHANGED
|
@@ -3,9 +3,6 @@ library_name: transformers
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: google/vit-base-patch16-224
|
| 5 |
tags:
|
| 6 |
-
- image-classification
|
| 7 |
-
- brain-tumor
|
| 8 |
-
- medical-imaging
|
| 9 |
- generated_from_trainer
|
| 10 |
datasets:
|
| 11 |
- imagefolder
|
|
@@ -18,7 +15,7 @@ model-index:
|
|
| 18 |
name: Image Classification
|
| 19 |
type: image-classification
|
| 20 |
dataset:
|
| 21 |
-
name:
|
| 22 |
type: imagefolder
|
| 23 |
config: default
|
| 24 |
split: train
|
|
@@ -26,7 +23,7 @@ model-index:
|
|
| 26 |
metrics:
|
| 27 |
- name: Accuracy
|
| 28 |
type: accuracy
|
| 29 |
-
value: 0.
|
| 30 |
---
|
| 31 |
|
| 32 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
@@ -34,10 +31,10 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 34 |
|
| 35 |
# vit-base-brain-tumor
|
| 36 |
|
| 37 |
-
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the
|
| 38 |
It achieves the following results on the evaluation set:
|
| 39 |
-
- Loss: 0.
|
| 40 |
-
- Accuracy: 0.
|
| 41 |
|
| 42 |
## Model description
|
| 43 |
|
|
@@ -56,7 +53,7 @@ More information needed
|
|
| 56 |
### Training hyperparameters
|
| 57 |
|
| 58 |
The following hyperparameters were used during training:
|
| 59 |
-
- learning_rate:
|
| 60 |
- train_batch_size: 16
|
| 61 |
- eval_batch_size: 8
|
| 62 |
- seed: 42
|
|
@@ -68,21 +65,21 @@ The following hyperparameters were used during training:
|
|
| 68 |
|
| 69 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
| 70 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
| 71 |
-
| 0.
|
| 72 |
-
| 0.
|
| 73 |
-
| 0.
|
| 74 |
-
| 0.
|
| 75 |
-
| 0.
|
| 76 |
-
| 0.
|
| 77 |
-
| 0.
|
| 78 |
-
| 0.
|
| 79 |
-
| 0.
|
| 80 |
-
| 0.
|
| 81 |
-
| 0.
|
| 82 |
-
| 0.
|
| 83 |
-
| 0.
|
| 84 |
-
| 0.
|
| 85 |
-
| 0.
|
| 86 |
|
| 87 |
|
| 88 |
### Framework versions
|
|
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: google/vit-base-patch16-224
|
| 5 |
tags:
|
|
|
|
|
|
|
|
|
|
| 6 |
- generated_from_trainer
|
| 7 |
datasets:
|
| 8 |
- imagefolder
|
|
|
|
| 15 |
name: Image Classification
|
| 16 |
type: image-classification
|
| 17 |
dataset:
|
| 18 |
+
name: imagefolder
|
| 19 |
type: imagefolder
|
| 20 |
config: default
|
| 21 |
split: train
|
|
|
|
| 23 |
metrics:
|
| 24 |
- name: Accuracy
|
| 25 |
type: accuracy
|
| 26 |
+
value: 0.862453531598513
|
| 27 |
---
|
| 28 |
|
| 29 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 31 |
|
| 32 |
# vit-base-brain-tumor
|
| 33 |
|
| 34 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
|
| 35 |
It achieves the following results on the evaluation set:
|
| 36 |
+
- Loss: 0.3625
|
| 37 |
+
- Accuracy: 0.8625
|
| 38 |
|
| 39 |
## Model description
|
| 40 |
|
|
|
|
| 53 |
### Training hyperparameters
|
| 54 |
|
| 55 |
The following hyperparameters were used during training:
|
| 56 |
+
- learning_rate: 2e-05
|
| 57 |
- train_batch_size: 16
|
| 58 |
- eval_batch_size: 8
|
| 59 |
- seed: 42
|
|
|
|
| 65 |
|
| 66 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
| 67 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
| 68 |
+
| 0.6486 | 1.0 | 135 | 0.6040 | 0.7127 |
|
| 69 |
+
| 0.5363 | 2.0 | 270 | 0.5300 | 0.8060 |
|
| 70 |
+
| 0.4727 | 3.0 | 405 | 0.4835 | 0.8209 |
|
| 71 |
+
| 0.4318 | 4.0 | 540 | 0.4525 | 0.8358 |
|
| 72 |
+
| 0.4027 | 5.0 | 675 | 0.4298 | 0.8358 |
|
| 73 |
+
| 0.3791 | 6.0 | 810 | 0.4145 | 0.8358 |
|
| 74 |
+
| 0.3764 | 7.0 | 945 | 0.4017 | 0.8433 |
|
| 75 |
+
| 0.3575 | 8.0 | 1080 | 0.3913 | 0.8433 |
|
| 76 |
+
| 0.352 | 9.0 | 1215 | 0.3840 | 0.8470 |
|
| 77 |
+
| 0.3466 | 10.0 | 1350 | 0.3775 | 0.8433 |
|
| 78 |
+
| 0.3447 | 11.0 | 1485 | 0.3733 | 0.8433 |
|
| 79 |
+
| 0.3361 | 12.0 | 1620 | 0.3697 | 0.8470 |
|
| 80 |
+
| 0.3352 | 13.0 | 1755 | 0.3672 | 0.8470 |
|
| 81 |
+
| 0.3347 | 14.0 | 1890 | 0.3657 | 0.8470 |
|
| 82 |
+
| 0.3365 | 15.0 | 2025 | 0.3653 | 0.8470 |
|
| 83 |
|
| 84 |
|
| 85 |
### Framework versions
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 343223968
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d3a6b4c7b10e0a4bff444feaef222d356bdb920d1ebfe0f22c70353c2e06ad7
|
| 3 |
size 343223968
|
runs/May24_11-08-17_ip-10-192-11-87/events.out.tfevents.1748084904.ip-10-192-11-87.1786.27
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:740e7c2bb6102eaa4be30f01089b9349d9f097eee5e343bd8fd3375d3cfbf5c2
|
| 3 |
+
size 13471
|
runs/May24_11-08-17_ip-10-192-11-87/events.out.tfevents.1748085215.ip-10-192-11-87.1786.28
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:752e1fda72a252454958be52ebaad8e6bb040cce69eb985c6090eecbdeba7509
|
| 3 |
+
size 411
|