Temporal video features extracted from ImageNet pre-trained ResNet-152.
Firstly, we need to extract the frames of each video by FFmpeg.
- On Linux, please refer to the
extract_frames.sh
file. - On Windows, the scripts are similar:
# Make a folder for each video
for %f in (./Videos/*.mp4) do mkdir "./Frames_folders/%~nf"
# Extract and save the frames of each video
for %f in (./Videos/*.mp4) do ffmpeg -i "./Videos/%f" "./Frames_folders/%~nf/%05d.jpg"
Just run the resnet_features.py
in Python:
python resnet_features.py
Requisites:
Pytorch >= 0.4.1