Instructions to use Konradowsky/beans-deit-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Konradowsky/beans-deit-tiny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Konradowsky/beans-deit-tiny") 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("Konradowsky/beans-deit-tiny") model = AutoModelForImageClassification.from_pretrained("Konradowsky/beans-deit-tiny", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,380 Bytes
95ab650 e53ba6b 95ab650 e53ba6b 95ab650 e53ba6b 0264d8e e53ba6b 0264d8e e53ba6b | 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 | ---
license: apache-2.0
library_name: transformers
pipeline_tag: image-classification
base_model: facebook/deit-tiny-patch16-224
datasets:
- AI-Lab-Makerere/beans
metrics:
- accuracy
- f1
tags:
- image-classification
- mlflow
---
# beans-deit-tiny
Fine-tuned `facebook/deit-tiny-patch16-224` for image classification (3 classes: angular_leaf_spot, bean_rust, healthy).
Trained in Google Colab (GPU), experiments tracked with MLflow, winner selected by validation accuracy.
## Training
- Dataset: `AI-Lab-Makerere/beans`
- Train / val / test: 1034 / 133 / 128
- Learning rate: 0.0002
- Epochs: 3
- Batch size: 32
- MLflow run: `run1_lr0.0002_ep3` (a4050afef1c545cd8e87cc47cba1bd02)
## Results
| split | accuracy | macro F1 |
|---|---|---|
| validation | 0.9624 | 0.9628 |
| test | 0.9453 | 0.9462 |
### Per-class metrics (test)
| class | precision | recall | f1 | support |
|:------------------|------------:|---------:|-------:|----------:|
| angular_leaf_spot | 1 | 0.8837 | 0.9383 | 43 |
| bean_rust | 0.86 | 1 | 0.9247 | 43 |
| healthy | 1 | 0.9524 | 0.9756 | 42 |

## Usage
```python
from transformers import pipeline
clf = pipeline("image-classification", model="Konradowsky/beans-deit-tiny")
clf("image.jpg", top_k=3)
```
|