Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么得到shape=(b, l, d)的image feature #7

Open
PangziZhang523 opened this issue Aug 19, 2024 · 1 comment
Open

怎么得到shape=(b, l, d)的image feature #7

PangziZhang523 opened this issue Aug 19, 2024 · 1 comment

Comments

@PangziZhang523
Copy link

PangziZhang523 commented Aug 19, 2024

model, image_processor = create_model_from_pretrained(model_name='ViT-SO400M-14-SigLIP-384', pretrained=self.image_tower_name,
image_mean=([0.5,0.5,0.5]), image_std=([0.5,0.5,0.5]), image_interpolation="bicubic", image_resize_mode="squash")
image_features = model.encode_image(images) # [1, 1152]

这样得到的feature是 (1, 1152),序列长度怎么得到,用model.forward_features(images) 报错timm ttributeError: 'CustomTextCLIP' object has no attribute 'forward_features'

@PangziZhang523
Copy link
Author

请教下diva的ViT-SO400M-14-SigLIP-384 的token长度是怎么做到121的呀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant