beichenzbc / Long-CLIP

[ECCV 2024] official code for "Long-CLIP: Unlocking the Long-Text Capability of CLIP"
Apache License 2.0
694 stars 33 forks source link

如果我只需要吧clip的编码器改为longclip怎么做 #85

Closed Michael-Yi-Rong closed 1 week ago

Michael-Yi-Rong commented 2 weeks ago

我想把clip嵌入图像的文本改为longclip

beichenzbc commented 2 weeks ago

model, preprocess = longclip.load("./checkpoints/longclip-B.pt", device=device) longclip.tokenize([xxxx]) text_features = model.encode_text(text)