π± Cat Breed Classifier
EfficientNetV2S fine-tuned to classify 67 cat breeds from a photo.
Model Details
| Backbone | EfficientNetV2S (ImageNet pretrained) |
| Head | Dense(512) β Dense(256) β Softmax(67) |
| Input | 224 Γ 224 RGB, scaled via preprocess_input |
| Classes | 67 cat breeds |
| Training | 2-phase: feature extraction then fine-tuning (top 80 layers) |
| Dataset | Cat Breeds β Kaggle |
Usage
import tensorflow as tf
from tensorflow.keras.applications.efficientnet_v2 import preprocess_input
from huggingface_hub import hf_hub_download
from PIL import Image
import numpy as np
import json
# Download model
model_path = hf_hub_download("ZEROTSUDIOS/cat-breed-classifier", "cat_breed_model.h5")
model = tf.keras.models.load_model(model_path, compile=False)
# Predict
img = Image.open("your_cat.jpg").convert("RGB").resize((224, 224))
arr = preprocess_input(np.array(img, dtype=np.float32))
probs = model.predict(arr[np.newaxis], verbose=0)[0]
print(f"Top prediction: class {np.argmax(probs)} ({probs.max()*100:.1f}%)")
Live Demo
Built into a Streamlit web app β model is downloaded automatically on first run.