Image Classification
Transformers
Safetensors
PyTorch
mobilenet_v2
dog-breed
mobilenet
computer-vision
Instructions to use valentinocc/dog-breed-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use valentinocc/dog-breed-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="valentinocc/dog-breed-classifier") 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("valentinocc/dog-breed-classifier") model = AutoModelForImageClassification.from_pretrained("valentinocc/dog-breed-classifier") - Notebooks
- Google Colab
- Kaggle
Dog Breed Classifier
This is a MobileNetV2 model fine-tuned for dog breed classification with 120 breed classes.
Supported Breeds
- Chihuahua
- Japanese Spaniel
- Maltese Dog
- Pekinese
- Shih-Tzu
- Blenheim Spaniel
- Papillon
- Toy Terrier
- Rhodesian Ridgeback
- Afghan Hound
- ... and 110 more breeds
Model Details
- Architecture: MobileNetV2 with custom classifier
- Input Size: 224x224 pixels
- Number of Classes: 120
- Framework: PyTorch
Usage
Via Hugging Face Inference API
import requests
API_URL = "https://api-inference.huggingface.co/models/valentinocc/dog-breed-classifier"
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
def query(filename):
with open(filename, "rb") as f:
data = f.read()
response = requests.post(API_URL, headers=headers, data=data)
return response.json()
# Predict dog breed
output = query("dog_image.jpg")
print(f"Predicted breed: {output[0]['label']} ({output[0]['score']:.2%} confidence)")
Django Integration
from utils.huggingface_client import HuggingFaceClient
hf_client = HuggingFaceClient()
result = hf_client.classify_image(image_file, "valentinocc/dog-breed-classifier")
Training Details
This model was trained on a custom dataset of dog breed images using transfer learning on MobileNetV2. The model achieves good performance across 120 different dog breeds.
Model Performance
- Input: RGB images, 224x224 pixels
- Output: Probability distribution over 120 dog breeds
- Architecture: MobileNetV2 backbone + custom classifier
- Downloads last month
- 75