We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, how can I use this to implement the "text-based video retrieval" function mentioned in the abstract?
The text was updated successfully, but these errors were encountered:
Hello, thank you for the interest. For the text-based video retrieval, you can use the following pseudo code:
videos = torch.randn((N, 3, H, W)) # multiple videos visual_embeds = model(videos, None, mode='video')['img_emb'] text_tokens = surgvlp.tokenize(['you query'], device=device) text_query_embed = model(None, text_tokens, mode='text')['text_emb'] logits_qurey = 100.0 * text_query_embed @ visual_embeds.T
The logits_query is a tensor of shape (N) indicating the similarity of each video to the given query
Sorry, something went wrong.
No branches or pull requests
Hello, how can I use this to implement the "text-based video retrieval" function mentioned in the abstract?
The text was updated successfully, but these errors were encountered: