VisME is a universal multimodal embedding model from our CVPR 2026 paper
Illuminating Visual Identity in Universal Multimodal Embeddings. Built on
Qwen2.5-VL-7B-Instruct, VisME produces dense embeddings for images, text, and image–text pairs, with strong performance on both general multimodal benchmarks (
MMEB) and identity-centric retrieval (
MVEB).
1import torch
2import torch.nn.functional as F
3from io import BytesIO
4from urllib.request import Request, urlopen
5from PIL import Image
6from visme import VisME
7
8model = VisME("path/to/this/repo")
9model = model.cuda().eval()
10
11instruction = "Represent the face with the following text."
12text = "Retrieve all images with the same cartoon character."
13
14samples = {
15 "SpiderMan_comic_E616": "https://static.wikia.nocookie.net/spiderman/images/a/ad/Peter_Parker_%28Earth-616%29_017.png/revision/latest?cb=20210807043502",
16 "SpiderMan_promo_E199999": "https://static.wikia.nocookie.net/marveldatabase/images/2/28/Peter_Parker_%28Earth-199999%29_from_Spider-Man_No_Way_Home_promotional_art_002.jpg/revision/latest/scale-to-width-down/1000?cb=20230730084204",
17 "Toxin": "https://static.wikia.nocookie.net/superheroes/images/5/53/Toxin.jpg/revision/latest?cb=20240813171932",
18}
19
20def load_image(url: str) -> Image.Image:
21 req = Request(url, headers={"User-Agent": "Mozilla/5.0"})
22 with urlopen(req, timeout=30) as resp:
23 return Image.open(BytesIO(resp.read())).convert("RGB")
24
25names = list(samples.keys())
26batch = [
27 {"image": load_image(samples[name]), "text": text, "instruction": instruction}
28 for name in names
29]
30
31with torch.no_grad():
32 embeddings = model.encode_input(batch) # shape: (3, 3584), L2-normalized
33
34# Pairwise cosine similarity
35# SpiderMan_comic_E616 <-> SpiderMan_promo_E199999
36# SpiderMan_comic_E616 <-> Toxin
37# SpiderMan_promo_E199999 <-> Toxin
38for i in range(len(names)):
39 for j in range(i + 1, len(names)):
40 sim = F.cosine_similarity(embeddings[i : i + 1], embeddings[j : j + 1]).item()
41 print(f"cosine_similarity({names[i]}, {names[j]}) = {sim:.4f}")
1@inproceedings{cao2026illuminating,
2 title={Illuminating Visual Identity in Universal Multimodal Embeddings},
3 author={Cao, Jiawei and Feng, Junyi and Hua, Jiashen and Huang, Ziheng and Deng, Bing and Wu, Kaijie and Gu, Chaochen and Ye, Jieping},
4 booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
5 pages={8737--8748},
6 year={2026}
7}
This model is built upon
Qwen2.5-VL-7B-Instruct. Please follow the license terms of the base model and the respective datasets used during training.