Downloads · 30 days
74
7% of all-time downloads
valentinocc/dog-breed-classifier
dog-breed-classifier is a image classification model from valentinocc. Use it when you need a label for an image. It is set up for transformers. The card lists the license as mit.
This is a MobileNetV2 model fine-tuned for dog breed classification with 120 breed classes.
Downloads · 30 days
74
7% of all-time downloads
All-time downloads
1.1K
Public
Parameters
2.4M
29.1 MB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors9.7 MB · 100%
From the Hugging Face model README
This is a MobileNetV2 model fine-tuned for dog breed classification with 120 breed classes.
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)")
from utils.huggingface_client import HuggingFaceClient
hf_client = HuggingFaceClient()
result = hf_client.classify_image(image_file, "valentinocc/dog-breed-classifier")
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.