Instructions to use dyaminda/image_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dyaminda/image_classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dyaminda/image_classification") 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("dyaminda/image_classification") model = AutoModelForImageClassification.from_pretrained("dyaminda/image_classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
End of training
Browse filesFiles changed (2)
- README.md+30-13
- pytorch_model.bin+1-1
3 unmodified lines4567789103 unmodified lines1415161718171819202122232425252627281 unmodified line3031323333343536353637383921 unmodified lines616263646465666768697071727071727374757677787980818283848586878889909192939478799596973 unmodified linestags:- generated_from_trainerdatasets:- beans- imagefoldermetrics:- accuracymodel-index:3 unmodified lines name: Image Classification type: image-classification dataset: name: beans type: beans name: imagefolder type: imagefolder config: default split: train args: default metrics: - name: Accuracy type: accuracy value: 0.9420289855072463 value: 0.53125---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You1 unmodified line
# image_classification
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the beans dataset.This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the imagefolder dataset.It achieves the following results on the evaluation set:- Loss: 0.3869- Accuracy: 0.9420- Loss: 1.2727- Accuracy: 0.5312
## Model description
21 unmodified lines- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- lr_scheduler_warmup_ratio: 0.1- num_epochs: 3- num_epochs: 20
### Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy ||:-------------:|:-----:|:----:|:---------------:|:--------:|| 0.9716 | 1.0 | 13 | 0.6693 | 0.9275 || 0.6674 | 2.0 | 26 | 0.4463 | 0.9565 || 0.5056 | 3.0 | 39 | 0.3736 | 0.9662 || 2.0804 | 1.0 | 10 | 2.0714 | 0.1625 || 2.0428 | 2.0 | 20 | 2.0324 | 0.2313 || 1.9463 | 3.0 | 30 | 1.8978 | 0.3438 || 1.7768 | 4.0 | 40 | 1.7234 | 0.375 || 1.6163 | 5.0 | 50 | 1.6029 | 0.4188 || 1.509 | 6.0 | 60 | 1.5122 | 0.5 || 1.4118 | 7.0 | 70 | 1.4839 | 0.4375 || 1.3381 | 8.0 | 80 | 1.4268 | 0.475 || 1.2653 | 9.0 | 90 | 1.4095 | 0.4813 || 1.1979 | 10.0 | 100 | 1.3504 | 0.5375 || 1.1219 | 11.0 | 110 | 1.3293 | 0.4875 || 1.0858 | 12.0 | 120 | 1.3023 | 0.4875 || 1.0214 | 13.0 | 130 | 1.3063 | 0.5188 || 1.0085 | 14.0 | 140 | 1.3306 | 0.5312 || 0.9615 | 15.0 | 150 | 1.2838 | 0.5 || 0.9277 | 16.0 | 160 | 1.3073 | 0.5125 || 0.898 | 17.0 | 170 | 1.2606 | 0.5437 || 0.8747 | 18.0 | 180 | 1.3116 | 0.5437 || 0.8657 | 19.0 | 190 | 1.3171 | 0.5375 || 0.8462 | 20.0 | 200 | 1.2619 | 0.525 |
### Framework versions
- Transformers 4.33.2- Pytorch 2.0.1+cu117- Datasets 2.14.4- Pytorch 2.0.1+cu118- Datasets 2.14.5- Tokenizers 0.13.31223version https://git-lfs.github.com/spec/v1oid sha256:bd646ac079d97a546024b9b31daa1ae88979bd629621cef6938e6380f38bd239oid sha256:bc5dffc550be0278a1c71b95eef8358431de851e79b100c0954d01b380be9e03size 343287149README.md+30-13
pytorch_model.bin+1-1