Instructions to use amaye15/ViT-Standford-Dogs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amaye15/ViT-Standford-Dogs with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="amaye15/ViT-Standford-Dogs") 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("amaye15/ViT-Standford-Dogs") model = AutoModelForImageClassification.from_pretrained("amaye15/ViT-Standford-Dogs", device_map="auto") - Notebooks
- Google Colab
- Kaggle
CanineNet: Dog Breed Classification for 'Le Refuge'
Github: Here
Huggingface Model: Here
Streamlit App: Here
DagsHub & Mlflow Experiement Tracking: Here
Project Overview
As a volunteer at 'Le Refuge,' a local animal protection association, I embarked on a mission to develop a machine learning tool that could aid in the classification of dog breeds from their vast image database. The project was inspired by my own experience finding my beloved pet, Snooky, through this association. To give back, I aimed to streamline their data management process by implementing an advanced breed classification algorithm.
from transformers import pipeline
# Specify the model you want to use
model_name = "amaye15/ViT-Standford-Dogs" # Example: Vision Transformer
# Load the image classification pipeline with the specified model
image_classifier = pipeline("image-classification", model=model_name)
# Path or URL to your image
image_path_or_url = "path_or_url_to_your_image"
# Get predictions
predictions = image_classifier(image_path_or_url)
# Define the number of top predictions you want to see (top k)
top_k = 5
# Print the top k predictions
for prediction in predictions[:top_k]:
print(f"Class: {prediction['label']}, Confidence: {prediction['score']:.2f}")
- Downloads last month
- 16