Downloads · 30 days
24
18% of all-time downloads
pictsure/pictsure-clip
pictsure-clip is a image classification model from pictsure. Use it when you need a label for an image. It is set up for pytorch. The card lists the license as mit.
PictSure (link to project website) is a novel few-shot learning model for image classification that leverages context images to make predictions on new, unseen images. The model combines pre-trained image encoders wit…
Downloads · 30 days
24
18% of all-time downloads
All-time downloads
133
Public
Parameters
523M
2.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.1 GB · 100%
From the Hugging Face model README
PictSure (link to project website) is a novel few-shot learning model for image classification that leverages context images to make predictions on new, unseen images. The model combines pre-trained image encoders with transformer architecture to enable effective few-shot learning with minimal examples. More details can be found on our paper page.
pip install torch torchvision
pip install huggingface_hub
pip install PictSure
This example can also be found (including the mentioned images) in our GitHub Repository.
from PictSure import PictSure
from PIL import Image
# Load pre-trained model
model = PictSure.from_pretrained("pictsure/pictsure-clip")
# Prepare context images and labels
context_images = [
Image.open("cat1.jpg"),
Image.open("cat2.jpg"),
Image.open("dog1.jpg"),
Image.open("dog2.jpg")
]
context_labels = [0, 0, 1, 1] # 0 for cat, 1 for dog
# Set context
model.set_context_images(context_images, context_labels)
# Make prediction on new image
test_image = Image.open("unknown_animal.jpg")
prediction = model.predict(test_image)
print(f"Predicted class: {prediction}")
PictSure consists of several key components:
The pre-trained models were trained on curated datasets for few-shot learning evaluation:
The model is evaluated using standard few-shot learning metrics:
| Model | Backbone | Parameters | Model Size | Performance |
|---|---|---|---|---|
| ResPreAll | ResNet18 | 53M | ~200MB | Balanced speed/accuracy |
| ViTPreAll | ViT-Base | 128M | ~500MB | Higher accuracy |
@misc{schiesser2025pictsure,
title={PictSure: Pretraining Embeddings Matters for In-Context Learning Image Classifiers},
author={Lukas Schiesser and Cornelius Wolff and Sophie Haas and Simon Pukrop},
year={2025},
eprint={2506.14842},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2506.14842},
}
For questions about this model card or the PictSure model, open an issue in the GitHub repository.