VideoMAE icon indicating copy to clipboard operation
VideoMAE copied to clipboard

Code for demo/inference

Open Xinxinatg opened this issue 2 years ago • 2 comments

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?

Xinxinatg avatar May 23 '22 01:05 Xinxinatg

You can check notebook inference here.

tuanlda78202 avatar May 20 '23 19:05 tuanlda78202

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'}]

shinbehavior avatar Nov 20 '23 14:11 shinbehavior