A data include some pictures and a text. Like: image1,image2,image3 and a text.
Can I use visualized bge?
How to use, thank you!
def encode(self, image=None, text=None):
# used for simple inference
if image is not None:
image = self.preprocess_val(Image.open(image)).unsqueeze(0)
if text is not None:
text = self.tokenizer(text, return_tensors="pt", padding=True)
return self.encode_mm(image.to(self.device), text.to(self.device))
else:
return self.encode_image(image.to(self.device))
else:
if text is not None:
text = self.tokenizer(text, return_tensors="pt", padding=True)
return self.encode_text(text.to(self.device))
else:
return None
A data include some pictures and a text. Like: image1,image2,image3 and a text. Can I use visualized bge? How to use, thank you!