sujitpal/clip-imageclef

Model

3

stars

8

commits

2

linked in READMEs

Oct 31, 2023

updated

clip
endpoints_compatible
image-search
language
multimodal
pytorch
transformers
vision
zero-shot-image-classification
Browse cluster: CLIP Vision-Language Models

README

Model Card: clip-imageclef

Model Details

OpenAI CLIP model fine-tuned using image-caption pairs from the Caption Prediction dataset provided for the ImageCLEF 2017 competition. The model was evaluated using before and after fine-tuning, MRR@10 were 0.57 and 0.88 respectively.

Model Date

September 6, 2021

Model Type

The base model is the OpenAI CLIP model. It uses a ViT-B/32 Transformer architecture as an image encoder and uses a masked self-attention Transformer as a text encoder. These encoders are trained to maximize the similarity of (image, text) pairs via a contrastive loss.

Fine-tuning

The fine-tuning can be reproduced using code from the Github repository elsevierlabs-os/clip-image-search.

Usage

from transformers import CLIPModel, CLIPProcessor

model = CLIPModel.from_pretrained("sujitpal/clip-imageclef")
processor = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
inputs = processor(text=captions, images=images, 
                   return_tensors="pt", padding=True)
output = model(**inputs)

Performance

Model-namek=1k=3k=5k=10k=20
zero-shot CLIP (baseline)0.4260.5340.5580.5730.578
clip-imageclef (this model)0.8020.8720.8770.8790.880

Contributors

sujitpal

8 commits

sujitpal/clip-imageclef

Model

3

stars

8

commits

2

linked in READMEs

Oct 31, 2023

updated

clip
endpoints_compatible
image-search
language
multimodal
pytorch
transformers
vision
zero-shot-image-classification
Browse cluster: CLIP Vision-Language Models

README

Model Card: clip-imageclef

Model Details

OpenAI CLIP model fine-tuned using image-caption pairs from the Caption Prediction dataset provided for the ImageCLEF 2017 competition. The model was evaluated using before and after fine-tuning, MRR@10 were 0.57 and 0.88 respectively.

Model Date

September 6, 2021

Model Type

The base model is the OpenAI CLIP model. It uses a ViT-B/32 Transformer architecture as an image encoder and uses a masked self-attention Transformer as a text encoder. These encoders are trained to maximize the similarity of (image, text) pairs via a contrastive loss.

Fine-tuning

The fine-tuning can be reproduced using code from the Github repository elsevierlabs-os/clip-image-search.

Usage

from transformers import CLIPModel, CLIPProcessor

model = CLIPModel.from_pretrained("sujitpal/clip-imageclef")
processor = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
inputs = processor(text=captions, images=images, 
                   return_tensors="pt", padding=True)
output = model(**inputs)

Performance

Model-namek=1k=3k=5k=10k=20
zero-shot CLIP (baseline)0.4260.5340.5580.5730.578
clip-imageclef (this model)0.8020.8720.8770.8790.880

Contributors

sujitpal

8 commits