Instructions to use sofiane-isi/vit-beans-sofiane with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sofiane-isi/vit-beans-sofiane with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="sofiane-isi/vit-beans-sofiane") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("sofiane-isi/vit-beans-sofiane") model = AutoModelForImageClassification.from_pretrained("sofiane-isi/vit-beans-sofiane", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,65 +1,44 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
|
| 4 |
-
base_model: google/vit-base-patch16-224-in21k
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
results: []
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
| 15 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
It achieves the following results on the evaluation set:
|
| 21 |
-
- Loss: 0.1224
|
| 22 |
-
- Accuracy: 0.9688
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
##
|
| 33 |
|
| 34 |
-
|
|
|
|
| 35 |
|
| 36 |
-
##
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
-
- learning_rate: 5e-05
|
| 42 |
-
- train_batch_size: 16
|
| 43 |
-
- eval_batch_size: 16
|
| 44 |
-
- seed: 42
|
| 45 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 46 |
-
- lr_scheduler_type: linear
|
| 47 |
-
- lr_scheduler_warmup_steps: 26
|
| 48 |
-
- num_epochs: 4
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
| 54 |
-
| 0.2800 | 1.0 | 65 | 0.2102 | 0.9699 |
|
| 55 |
-
| 0.1494 | 2.0 | 130 | 0.1203 | 0.9699 |
|
| 56 |
-
| 0.0871 | 3.0 | 195 | 0.1297 | 0.9699 |
|
| 57 |
-
| 0.1232 | 4.0 | 260 | 0.1018 | 0.9774 |
|
| 58 |
|
| 59 |
-
|
| 60 |
-
### Framework versions
|
| 61 |
-
|
| 62 |
-
- Transformers 5.16.1
|
| 63 |
-
- Pytorch 2.11.0+cu128
|
| 64 |
-
- Datasets 5.0.1
|
| 65 |
-
- Tokenizers 0.23.1
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
pipeline_tag: image-classification
|
|
|
|
| 4 |
tags:
|
| 5 |
+
- image-classification
|
| 6 |
+
- vit
|
| 7 |
+
- beans
|
| 8 |
+
datasets:
|
| 9 |
+
- AI-Lab-Makerere/beans
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# ViT Beans Classifier
|
|
|
|
| 13 |
|
| 14 |
+
Vision Transformer fine-tuned for bean leaf disease classification.
|
| 15 |
|
| 16 |
+
## Repository
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
`sofiane-isi/vit-beans-sofiane`
|
| 19 |
|
| 20 |
+
## Dataset
|
| 21 |
|
| 22 |
+
`AI-Lab-Makerere/beans`
|
| 23 |
|
| 24 |
+
Classes:
|
| 25 |
+
- angular_leaf_spot
|
| 26 |
+
- bean_rust
|
| 27 |
+
- healthy
|
| 28 |
|
| 29 |
+
## Evaluation
|
| 30 |
|
| 31 |
+
- Accuracy: 0.96875
|
| 32 |
+
- Evaluation loss: 0.12236211448907852
|
| 33 |
|
| 34 |
+
## Base model
|
| 35 |
|
| 36 |
+
`google/vit-base-patch16-224-in21k`
|
| 37 |
|
| 38 |
+
## MLOps workflow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
Dataset → preprocessing → fine-tuning → evaluation → Hugging Face Hub → Model Card → Space.
|
| 41 |
|
| 42 |
+
## Limitations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
Educational model fine-tuned specifically on the Beans dataset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|