VideoMAE
VideoMAE copied to clipboard
Code for demo/inference
Thanks for the great work! I am wondering whether the demo/inference code has been released so that we can quickly test out the model on customized videos?
You can check notebook inference here.
Thanks for the great work! I am wondering whether the demo/inference code has been released so that we can quickly test out the model on customized videos?
Just upload your model on hugface and use it:
from transformers import pipeline
video_cls = pipeline(model="my_awesome_video_cls_model")
video_cls("https://huggingface.co/datasets/sayakpaul/ucf101-subset/resolve/main/v_BasketballDunk_g14_c06.avi")
Output:
[{'score': 0.9272987842559814, 'label': 'BasketballDunk'},
{'score': 0.017777055501937866, 'label': 'BabyCrawling'},
{'score': 0.01663011871278286, 'label': 'BalanceBeam'},
{'score': 0.009560945443809032, 'label': 'BandMarching'},
{'score': 0.0068979403004050255, 'label': 'BaseballPitch'}]