How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-feature-extraction", model="aeth0r/cat2vec-v2")
# Load model directly
from transformers import AutoImageProcessor, AutoModel

processor = AutoImageProcessor.from_pretrained("aeth0r/cat2vec-v2")
model = AutoModel.from_pretrained("aeth0r/cat2vec-v2")
Quick Links

cat2vec

The cat2vec model is a search model for cats.

It was trained using the Labeled Cats In The Wild dataset and a triplet loss.

Usage

from transformers import AutoImageProcessor, ResNetModel
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][:2]

processor = AutoImageProcessor.from_pretrained("facebook/dinov2-small")
model = ResNetModel.from_pretrained("aeth0r/cat2vec-v2")

inputs = processor(image, return_tensors="pt")

with torch.no_grad():
    features = model(**inputs)

print(features)
Downloads last month
6
Safetensors
Model size
22.1M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for aeth0r/cat2vec-v2

Finetuned
(25)
this model