Instructions to use nqvii/fold_5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nqvii/fold_5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nqvii/fold_5") 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("nqvii/fold_5") model = AutoModelForImageClassification.from_pretrained("nqvii/fold_5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
End of training Fold 5
Browse files- README.md +124 -0
- config.json +37 -0
- model.safetensors +3 -0
- preprocessor_config.json +23 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: google/vit-base-patch16-224
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
datasets:
|
| 8 |
+
- imagefolder
|
| 9 |
+
metrics:
|
| 10 |
+
- accuracy
|
| 11 |
+
- recall
|
| 12 |
+
model-index:
|
| 13 |
+
- name: fold_5
|
| 14 |
+
results:
|
| 15 |
+
- task:
|
| 16 |
+
name: Image Classification
|
| 17 |
+
type: image-classification
|
| 18 |
+
dataset:
|
| 19 |
+
name: imagefolder
|
| 20 |
+
type: imagefolder
|
| 21 |
+
config: default
|
| 22 |
+
split: None
|
| 23 |
+
args: default
|
| 24 |
+
metrics:
|
| 25 |
+
- name: Accuracy
|
| 26 |
+
type: accuracy
|
| 27 |
+
value: 0.9584775086505191
|
| 28 |
+
- name: Recall
|
| 29 |
+
type: recall
|
| 30 |
+
value: 0.96098499101133
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 34 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 35 |
+
|
| 36 |
+
# fold_5
|
| 37 |
+
|
| 38 |
+
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.
|
| 39 |
+
It achieves the following results on the evaluation set:
|
| 40 |
+
- Loss: 1.1415
|
| 41 |
+
- Accuracy: 0.9585
|
| 42 |
+
- F1 Score: 0.9604
|
| 43 |
+
- Recall: 0.9610
|
| 44 |
+
|
| 45 |
+
## Model description
|
| 46 |
+
|
| 47 |
+
More information needed
|
| 48 |
+
|
| 49 |
+
## Intended uses & limitations
|
| 50 |
+
|
| 51 |
+
More information needed
|
| 52 |
+
|
| 53 |
+
## Training and evaluation data
|
| 54 |
+
|
| 55 |
+
More information needed
|
| 56 |
+
|
| 57 |
+
## Training procedure
|
| 58 |
+
|
| 59 |
+
### Training hyperparameters
|
| 60 |
+
|
| 61 |
+
The following hyperparameters were used during training:
|
| 62 |
+
- learning_rate: 1e-05
|
| 63 |
+
- train_batch_size: 64
|
| 64 |
+
- eval_batch_size: 64
|
| 65 |
+
- seed: 42
|
| 66 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 67 |
+
- lr_scheduler_type: cosine
|
| 68 |
+
- lr_scheduler_warmup_steps: 150
|
| 69 |
+
- num_epochs: 100
|
| 70 |
+
- label_smoothing_factor: 0.15
|
| 71 |
+
|
| 72 |
+
### Training results
|
| 73 |
+
|
| 74 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Score | Recall |
|
| 75 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:|:------:|
|
| 76 |
+
| 2.7679 | 1.0 | 19 | 2.7376 | 0.3356 | 0.2925 | 0.3120 |
|
| 77 |
+
| 2.6412 | 2.0 | 38 | 2.5528 | 0.4567 | 0.3907 | 0.4082 |
|
| 78 |
+
| 2.2891 | 3.0 | 57 | 2.3004 | 0.6125 | 0.5730 | 0.5668 |
|
| 79 |
+
| 1.9662 | 4.0 | 76 | 1.9746 | 0.7509 | 0.7537 | 0.7393 |
|
| 80 |
+
| 1.5390 | 5.0 | 95 | 1.6498 | 0.8374 | 0.8436 | 0.8325 |
|
| 81 |
+
| 1.3191 | 6.0 | 114 | 1.4345 | 0.8789 | 0.8884 | 0.8848 |
|
| 82 |
+
| 1.1787 | 7.0 | 133 | 1.3242 | 0.8962 | 0.9025 | 0.8958 |
|
| 83 |
+
| 1.1229 | 8.0 | 152 | 1.2923 | 0.8927 | 0.8969 | 0.8856 |
|
| 84 |
+
| 1.0605 | 9.0 | 171 | 1.2239 | 0.9239 | 0.9278 | 0.9253 |
|
| 85 |
+
| 1.0463 | 10.0 | 190 | 1.2173 | 0.9308 | 0.9339 | 0.9300 |
|
| 86 |
+
| 1.0295 | 11.0 | 209 | 1.2042 | 0.9412 | 0.9437 | 0.9426 |
|
| 87 |
+
| 1.0210 | 12.0 | 228 | 1.1941 | 0.9412 | 0.9437 | 0.9426 |
|
| 88 |
+
| 1.0174 | 13.0 | 247 | 1.1868 | 0.9446 | 0.9474 | 0.9464 |
|
| 89 |
+
| 1.0169 | 14.0 | 266 | 1.1932 | 0.9343 | 0.9366 | 0.9337 |
|
| 90 |
+
| 1.0026 | 15.0 | 285 | 1.2058 | 0.9377 | 0.9401 | 0.9362 |
|
| 91 |
+
| 1.0057 | 16.0 | 304 | 1.1721 | 0.9446 | 0.9467 | 0.9462 |
|
| 92 |
+
| 0.9959 | 17.0 | 323 | 1.1659 | 0.9412 | 0.9435 | 0.9425 |
|
| 93 |
+
| 0.9822 | 18.0 | 342 | 1.1760 | 0.9412 | 0.9437 | 0.9412 |
|
| 94 |
+
| 0.9793 | 19.0 | 361 | 1.1816 | 0.9412 | 0.9434 | 0.9399 |
|
| 95 |
+
| 0.9772 | 20.0 | 380 | 1.1641 | 0.9516 | 0.9530 | 0.9510 |
|
| 96 |
+
| 0.9745 | 21.0 | 399 | 1.1622 | 0.9516 | 0.9533 | 0.9522 |
|
| 97 |
+
| 0.9757 | 22.0 | 418 | 1.1569 | 0.9550 | 0.9573 | 0.9574 |
|
| 98 |
+
| 0.9639 | 23.0 | 437 | 1.1593 | 0.9446 | 0.9467 | 0.9462 |
|
| 99 |
+
| 0.9746 | 24.0 | 456 | 1.1542 | 0.9481 | 0.9505 | 0.9500 |
|
| 100 |
+
| 0.9691 | 25.0 | 475 | 1.1527 | 0.9550 | 0.9567 | 0.9573 |
|
| 101 |
+
| 0.9656 | 26.0 | 494 | 1.1619 | 0.9481 | 0.9501 | 0.9496 |
|
| 102 |
+
| 0.9629 | 27.0 | 513 | 1.1539 | 0.9516 | 0.9533 | 0.9534 |
|
| 103 |
+
| 0.9690 | 28.0 | 532 | 1.1523 | 0.9516 | 0.9539 | 0.9534 |
|
| 104 |
+
| 0.9660 | 29.0 | 551 | 1.1474 | 0.9550 | 0.9573 | 0.9573 |
|
| 105 |
+
| 0.9728 | 30.0 | 570 | 1.1424 | 0.9585 | 0.9603 | 0.9608 |
|
| 106 |
+
| 0.9644 | 31.0 | 589 | 1.1415 | 0.9585 | 0.9604 | 0.9610 |
|
| 107 |
+
| 0.9610 | 32.0 | 608 | 1.1462 | 0.9550 | 0.9563 | 0.9558 |
|
| 108 |
+
| 0.9623 | 33.0 | 627 | 1.1423 | 0.9550 | 0.9566 | 0.9571 |
|
| 109 |
+
| 0.9630 | 34.0 | 646 | 1.1416 | 0.9516 | 0.9536 | 0.9546 |
|
| 110 |
+
| 0.9664 | 35.0 | 665 | 1.1438 | 0.9550 | 0.9566 | 0.9571 |
|
| 111 |
+
| 0.9643 | 36.0 | 684 | 1.1454 | 0.9550 | 0.9566 | 0.9571 |
|
| 112 |
+
| 0.9670 | 37.0 | 703 | 1.1431 | 0.9550 | 0.9566 | 0.9571 |
|
| 113 |
+
| 0.9631 | 38.0 | 722 | 1.1490 | 0.9481 | 0.9503 | 0.9498 |
|
| 114 |
+
| 0.9589 | 39.0 | 741 | 1.1512 | 0.9481 | 0.9503 | 0.9498 |
|
| 115 |
+
| 0.9620 | 40.0 | 760 | 1.1427 | 0.9516 | 0.9535 | 0.9535 |
|
| 116 |
+
| 0.9552 | 41.0 | 779 | 1.1427 | 0.9516 | 0.9535 | 0.9535 |
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
### Framework versions
|
| 120 |
+
|
| 121 |
+
- Transformers 5.0.0
|
| 122 |
+
- Pytorch 2.10.0+cu128
|
| 123 |
+
- Datasets 5.0.0
|
| 124 |
+
- Tokenizers 0.22.2
|
config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ViTForImageClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.0,
|
| 6 |
+
"dtype": "float32",
|
| 7 |
+
"encoder_stride": 16,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.0,
|
| 10 |
+
"hidden_size": 768,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "Bacterial Leaf Blight",
|
| 13 |
+
"1": "Brown Spot",
|
| 14 |
+
"2": "Healthy Leaf",
|
| 15 |
+
"3": "Tungro Virus"
|
| 16 |
+
},
|
| 17 |
+
"image_size": 224,
|
| 18 |
+
"initializer_range": 0.02,
|
| 19 |
+
"intermediate_size": 3072,
|
| 20 |
+
"label2id": {
|
| 21 |
+
"Bacterial Leaf Blight": "0",
|
| 22 |
+
"Brown Spot": "1",
|
| 23 |
+
"Healthy Leaf": "2",
|
| 24 |
+
"Tungro Virus": "3"
|
| 25 |
+
},
|
| 26 |
+
"layer_norm_eps": 1e-12,
|
| 27 |
+
"model_type": "vit",
|
| 28 |
+
"num_attention_heads": 12,
|
| 29 |
+
"num_channels": 3,
|
| 30 |
+
"num_hidden_layers": 12,
|
| 31 |
+
"patch_size": 16,
|
| 32 |
+
"pooler_act": "tanh",
|
| 33 |
+
"pooler_output_size": 768,
|
| 34 |
+
"qkv_bias": true,
|
| 35 |
+
"transformers_version": "5.0.0",
|
| 36 |
+
"use_cache": false
|
| 37 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d0e7a5594c7dd980a12698c98ca1be0830eee19c792118a35a51ba380b68436
|
| 3 |
+
size 343230128
|
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:2ff66dc829a6ffd119f9b6415973ed7498319d62331ba80df43fb579260bf623
|
| 3 |
+
size 5201
|