Comments (5)
Thank you very much. According to your tips, I have basically reproduced text feature extraction.😀
from umt.
You may refer to the CLIP feature extractor in this repo. For the QVHighlights dataset, we directly adopted the features provided by the original authors.
from umt.
- We directly adopted the text features from Moment DETR. And they indeed used ViT-B/32 as mentioned here.
- Yes.
from umt.
-
This is my code for text preprocessing as follows,I wonder if it is correct.
device = "cuda" if torch.cuda.is_available() else "cpu" model, preprocess = clip.load("ViT-B/32", device=device) text = clip.tokenize(["some military patriots takes us through their safety procedures and measures"]).to(device) with torch.no_grad(): text_features = model.encode_text(text) # print(text_features.shape) np.savez('text_features.npz', text_features)
-
My text extraction dimension is (1,52) and is different from that of your preprocessed text. Is my thinking wrong?
print(text_features['arr_0'].shape) # (1, 512)
####
q_features = np.load('qid6.npz')
print(q_features.files) # ['last_hidden_state', 'pooler_output']
print(q_features['last_hidden_state'].shape) # (8, 512)
print(q_features['pooler_output'].shape) # (512,)
from umt.
Can you provide the specific code?
from umt.
Related Issues (20)
- 音频特征提取部分的代码 HOT 1
- Attention map visualization HOT 2
- TVSum training problem HOT 2
- Query feature in TVSum highlight detection HOT 1
- Model applicability HOT 1
- Audio feature extraction HOT 1
- Any idea of model's general highlight effectiveness HOT 2
- Inference mode HOT 6
- Error. TypeError: '>=' not supported between instances of 'DataContainer' and 'int' HOT 2
- Inference code HOT 1
- result of QVHighlights val set HOT 2
- qvhighlights/umt_base_pretrain_100e_asr.py HOT 1
- The Checkpoint file requirment
- Audio feature extraction HOT 1
- My dataset HOT 1
- The forward method of UMT HOT 1
- about model HOT 1
- Model Instability HOT 3
- Seed for Youtube Highlights Categories HOT 1
- Will the model automatically truncate the video if the video duration is greater than 150 seconds?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umt.