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

  1. Install dependencies:

    pip install torch torchvision timm pytorch-lightning albumentations opencv-python-headless scikit-learn Pillow huggingface_hub python-box PyYAML
    
  2. Download inference.py, pytorch_model.ckpt, and label_encoder.pkl from this repository.

  3. 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

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using Hajorda/keduClassifier 1