KEDU Breed Classifier (swin_tiny_patch4_window7_224)
This model classifies pet breeds based on the Oxford-IIIT Pet Dataset.
Model architecture: swin_tiny_patch4_window7_224
.
How to Use
Install dependencies:
pip install torch torchvision timm pytorch-lightning albumentations opencv-python-headless scikit-learn Pillow huggingface_hub python-box PyYAML
Download
inference.py
,pytorch_model.ckpt
, andlabel_encoder.pkl
from this repository.Run inference:
from inference import load_model_from_hf, load_label_encoder_from_hf, predict_breed model = load_model_from_hf(repo_id="Hajorda/keduClassifier") label_encoder = load_label_encoder_from_hf(repo_id="Hajorda/keduClassifier") image_path = "path/to/your/pet_image.jpg" # Replace with your image path predicted_breed, confidence = predict_breed(image_path, model, label_encoder) print(f"Predicted: {predicted_breed}, Confidence: {confidence:.4f}")
Model Details
- Dataset: Oxford-IIIT Pet Dataset
- Number of Classes: 37
- Image Size: (224, 224)
Performance
- Validation Accuracy: 93.40% (Note: This is the validation accuracy from the training run.)
Author
Hajorda
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support