plip icon indicating copy to clipboard operation
plip copied to clipboard

Extract Image Features

Open bryanwong17 opened this issue 5 months ago • 0 comments

Hi, I would like to extract image features using PLIP

from transformers import CLIPModel
model = CLIPModel.from_pretrained('vinid/plip')

for batch in dataloader:
  with torch.no_grad():
     batch = batch.to(device)
     embeds = ...

Could you please let me know how to write the forward code to extract image features using PLIP? Thank you

bryanwong17 avatar Sep 24 '24 10:09 bryanwong17