--- library_name: transformers license: apache-2.0 base_model: timm/mobilenetv3_small_100.lamb_in1k tags: - image-classification - vision - timm - generated_from_trainer datasets: - AI-Lab-Makerere/beans metrics: - accuracy pipeline_tag: image-classification model-index: - name: beans-image-classifier results: - task: type: image-classification name: Image Classification dataset: name: AI-Lab-Makerere/beans type: AI-Lab-Makerere/beans metrics: - type: accuracy value: 0.9549 name: Validation Accuracy - type: accuracy value: 0.8984 name: Test Accuracy --- # Bean Leaf Disease Classifier Fine-tuned [MobileNetV3-Small](https://huggingface.co/timm/mobilenetv3_small_100.lamb_in1k) on [AI-Lab-Makerere/beans](https://huggingface.co/datasets/AI-Lab-Makerere/beans). Given a photo of a bean leaf, the model predicts one of: - `angular_leaf_spot` - `bean_rust` - `healthy` ## Metrics | Split | Accuracy | Loss | | --- | ---: | ---: | | Validation (best checkpoint) | 95.49% | 0.235 | | Test | 89.84% | 0.303 | Training ran for 5 epochs on Apple Silicon (MPS). The best checkpoint was restored before export. ## Usage ```python from transformers import pipeline clf = pipeline("image-classification", model="omaralshareef/beans-image-classifier") print(clf("leaf.jpg")) ``` ## Training hyperparameters - learning rate: `5e-5` - train batch size: 16 - eval batch size: 16 - epochs: 5 - optimizer: AdamW - seed: 42 ## Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | 0.5874 | 1.0 | 65 | 0.4124 | 0.8346 | | 0.4042 | 2.0 | 130 | 0.2352 | 0.9549 | | 0.2805 | 3.0 | 195 | 0.1679 | 0.9549 | | 0.2367 | 4.0 | 260 | 0.1370 | 0.9549 | | 0.1933 | 5.0 | 325 | 0.1394 | 0.9398 |