Multilingual-CLIP extends OpenAI's English text encoders to multiple other languages. This model
only
contains the multilingual text encoder. The corresponding image model
ViT-L-14
can be retrieved via instructions found on OpenAI's
CLIP repository on Github
. We provide a usage example below.
Requirements
To use both the multilingual text encoder and corresponding image encoder, we need to install the packages
multilingual-clip
and
clip
.
Extracting embeddings from the text encoder can be done in the following way:
from multilingual_clip import pt_multilingual_clip
import transformers
texts = [
'Three blind horses listening to Mozart.',
'Älgen är skogens konung!',
'Wie leben Eisbären in der Antarktis?',
'Вы знали, что все белые медведи левши?'
]
model_name = 'M-CLIP/LABSE-Vit-L-14'# Load Model & Tokenizer
model = pt_multilingual_clip.MultilingualCLIP.from_pretrained(model_name)
tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
embeddings = model.forward(texts, tokenizer)
print("Text features shape:", embeddings.shape)
Extracting embeddings from the corresponding image encoder:
None of the M-CLIP models have been extensivly evaluated, but testing them on Txt2Img retrieval on the humanly translated MS-COCO dataset, we see the following
R@10
results:
Further details about the model training and data can be found in the
model card
.
Runs of M-CLIP LABSE-Vit-L-14 on huggingface.co
599
Total runs
-1
24-hour runs
-7
3-day runs
-49
7-day runs
-1
30-day runs
More Information About LABSE-Vit-L-14 huggingface.co Model
LABSE-Vit-L-14 huggingface.co
LABSE-Vit-L-14 huggingface.co is an AI model on huggingface.co that provides LABSE-Vit-L-14's model effect (), which can be used instantly with this M-CLIP LABSE-Vit-L-14 model. huggingface.co supports a free trial of the LABSE-Vit-L-14 model, and also provides paid use of the LABSE-Vit-L-14. Support call LABSE-Vit-L-14 model through api, including Node.js, Python, http.
LABSE-Vit-L-14 huggingface.co is an online trial and call api platform, which integrates LABSE-Vit-L-14's modeling effects, including api services, and provides a free online trial of LABSE-Vit-L-14, you can try LABSE-Vit-L-14 online for free by clicking the link below.
M-CLIP LABSE-Vit-L-14 online free url in huggingface.co:
LABSE-Vit-L-14 is an open source model from GitHub that offers a free installation service, and any user can find LABSE-Vit-L-14 on GitHub to install. At the same time, huggingface.co provides the effect of LABSE-Vit-L-14 install, users can directly use LABSE-Vit-L-14 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.