vit-beans-mit-aug
Browse files- README.md +78 -0
- config.json +35 -0
- model.safetensors +3 -0
- preprocessor_config.json +23 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: google/vit-base-patch16-224
|
| 5 |
+
tags:
|
| 6 |
+
- image-classification
|
| 7 |
+
- beans
|
| 8 |
+
- static-augmentation
|
| 9 |
+
- vit
|
| 10 |
+
- transfer-learning
|
| 11 |
+
- generated_from_trainer
|
| 12 |
+
datasets:
|
| 13 |
+
- beans
|
| 14 |
+
metrics:
|
| 15 |
+
- accuracy
|
| 16 |
+
model-index:
|
| 17 |
+
- name: beans_mit_aug
|
| 18 |
+
results:
|
| 19 |
+
- task:
|
| 20 |
+
name: Image Classification
|
| 21 |
+
type: image-classification
|
| 22 |
+
dataset:
|
| 23 |
+
name: nateraw/beans
|
| 24 |
+
type: beans
|
| 25 |
+
config: default
|
| 26 |
+
split: validation
|
| 27 |
+
args: default
|
| 28 |
+
metrics:
|
| 29 |
+
- name: Accuracy
|
| 30 |
+
type: accuracy
|
| 31 |
+
value: 0.96875
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 35 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 36 |
+
|
| 37 |
+
# beans_mit_aug
|
| 38 |
+
|
| 39 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the nateraw/beans dataset.
|
| 40 |
+
It achieves the following results on the evaluation set:
|
| 41 |
+
- Loss: 0.1334
|
| 42 |
+
- Accuracy: 0.9688
|
| 43 |
+
|
| 44 |
+
## Model description
|
| 45 |
+
|
| 46 |
+
More information needed
|
| 47 |
+
|
| 48 |
+
## Intended uses & limitations
|
| 49 |
+
|
| 50 |
+
More information needed
|
| 51 |
+
|
| 52 |
+
## Training and evaluation data
|
| 53 |
+
|
| 54 |
+
More information needed
|
| 55 |
+
|
| 56 |
+
## Training procedure
|
| 57 |
+
|
| 58 |
+
### Training hyperparameters
|
| 59 |
+
|
| 60 |
+
The following hyperparameters were used during training:
|
| 61 |
+
- learning_rate: 0.0002
|
| 62 |
+
- train_batch_size: 16
|
| 63 |
+
- eval_batch_size: 16
|
| 64 |
+
- seed: 42
|
| 65 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 66 |
+
- lr_scheduler_type: linear
|
| 67 |
+
- num_epochs: 4
|
| 68 |
+
|
| 69 |
+
### Training results
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
### Framework versions
|
| 74 |
+
|
| 75 |
+
- Transformers 4.52.3
|
| 76 |
+
- Pytorch 2.7.0+cu126
|
| 77 |
+
- Datasets 3.6.0
|
| 78 |
+
- Tokenizers 0.21.1
|
config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ViTForImageClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.0,
|
| 6 |
+
"encoder_stride": 16,
|
| 7 |
+
"hidden_act": "gelu",
|
| 8 |
+
"hidden_dropout_prob": 0.0,
|
| 9 |
+
"hidden_size": 768,
|
| 10 |
+
"id2label": {
|
| 11 |
+
"0": "angular_leaf_spot",
|
| 12 |
+
"1": "bean_rust",
|
| 13 |
+
"2": "healthy"
|
| 14 |
+
},
|
| 15 |
+
"image_size": 224,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 3072,
|
| 18 |
+
"label2id": {
|
| 19 |
+
"angular_leaf_spot": 0,
|
| 20 |
+
"bean_rust": 1,
|
| 21 |
+
"healthy": 2
|
| 22 |
+
},
|
| 23 |
+
"layer_norm_eps": 1e-12,
|
| 24 |
+
"model_type": "vit",
|
| 25 |
+
"num_attention_heads": 12,
|
| 26 |
+
"num_channels": 3,
|
| 27 |
+
"num_hidden_layers": 12,
|
| 28 |
+
"patch_size": 16,
|
| 29 |
+
"pooler_act": "tanh",
|
| 30 |
+
"pooler_output_size": 768,
|
| 31 |
+
"problem_type": "single_label_classification",
|
| 32 |
+
"qkv_bias": true,
|
| 33 |
+
"torch_dtype": "float32",
|
| 34 |
+
"transformers_version": "4.52.3"
|
| 35 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c911fa162147378415cc9e738e20ff11eebade1129c1541ebb310dbf434fd988
|
| 3 |
+
size 343227052
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": null,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.5,
|
| 8 |
+
0.5,
|
| 9 |
+
0.5
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "ViTImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.5,
|
| 14 |
+
0.5,
|
| 15 |
+
0.5
|
| 16 |
+
],
|
| 17 |
+
"resample": 2,
|
| 18 |
+
"rescale_factor": 0.00392156862745098,
|
| 19 |
+
"size": {
|
| 20 |
+
"height": 224,
|
| 21 |
+
"width": 224
|
| 22 |
+
}
|
| 23 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d1e8769a54737cc96fd61678c35cdadaaf9199d57243ce110d69a897733fbd4f
|
| 3 |
+
size 5649
|