Instructions to use SupremoUGH/image-classification-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupremoUGH/image-classification-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="SupremoUGH/image-classification-model") 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("SupremoUGH/image-classification-model") model = AutoModelForImageClassification.from_pretrained("SupremoUGH/image-classification-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| language: en | |
| tags: | |
| - image-classification | |
| - vision | |
| model-index: | |
| - name: ViT Image Classification Model | |
| sources: | |
| - https://huggingface.co/SupremoUGH/image-classification-model | |
| results: | |
| - task: | |
| name: image-classification | |
| type: image-classification | |
| metrics: | |
| - name: Accuracy | |
| value: 98.0% | |
| type: float | |
| library_name: transformers | |
| license: mit | |
| # Image Classification Model (ViT) | |
| This is an image classification model based on **Vision Transformer (ViT)**, fine-tuned on the **MNIST** dataset. The model is designed to classify images into one of 10 possible classes (digits 0-9). The code is compatible with Hugging Face's inference providers and can be easily deployed. | |
| ## Model Details | |
| - **Model Type**: Vision Transformer (ViT) | |
| - **Base Model**: `google/vit-base-patch16-224` | |
| - **Task**: Image Classification | |
| - **Dataset**: MNIST (handwritten digits) | |
| - **Labels**: 10 classes (0-9) | |
| ## How to Use | |
| ### Install Requirements | |
| Make sure you have the following dependencies installed: | |
| ```bash | |
| pip3 install requirements.txt | |
| ``` | |
| ### Run unit tests | |
| ```bash | |
| python3 -m unittest discover -s tests | |
| ``` | |