We will try out a pre-trained I3D model on a single video clip.
First, please follow the to install and if you haven’t done so yet.
Then, we download the video and extract a 32-frame clip from it.
Now we define transformations for the video clip. This transformation function does three things: center crop the image to 224x224 in size, transpose it to , and normalize with mean and standard deviation calculated across all ImageNet images.
Next, we load a pre-trained I3D model.
Note that if you want to use InceptionV3 series model (i.e., i3d_inceptionv3_kinetics400), please resize the image to have both dimensions larger than 299 (e.g., 340x450) and change input size from 224 to 299 in the transform function. Finally, we prepare the video clip and feed it to the model.
We can see that our pre-trained model predicts this video clip to be action with high confidence.
版权声明:
本文来源网络,所有图片文章版权属于原作者,如有侵权,联系删除。
本文网址:https://www.mushiming.com/mjsbk/11843.html