wiz-io/cat_images
Viewer โข Updated โข 600 โข 235
How to use wiz-io/happy_cat with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="wiz-io/happy_cat")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("wiz-io/happy_cat")
model = AutoModelForImageClassification.from_pretrained("wiz-io/happy_cat", device_map="auto")Tells whether a cat looks happy or sad.
A linear classification head trained on frozen features of google/vit-base-patch16-224-in21k,
using the wiz-io/cat_images images. Training runs in the
wiz-io/cat_mode Space, which also serves a demo UI.
| Split | Images | Accuracy |
|---|---|---|
| train | 480 | 93.8% |
| test | 120 | 72.5% |
from transformers import pipeline
classifier = pipeline("image-classification", model="wiz-io/happy_cat")
classifier("my_cat.jpg")
This is a small test model: the labels in the source dataset were generated automatically, so expect mistakes.
Base model
google/vit-base-patch16-224-in21k