open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
https://mmaction2.readthedocs.io
Apache License 2.0
4.3k stars 1.25k forks source link

How can I do this? Input a video, and then output the RGB+FLOW feature of each frame. #1640

Open wolf-bailang opened 2 years ago

wolf-bailang commented 2 years ago

Before raising a question, you may need to check the following listed items.

Checklist

  1. I have searched related issues but cannot get the expected help. Yes
  2. I have read the FAQ documentation but cannot get the expected help. Yes

my problem:

I am using an I3D model to extract features for RGB+flow of the kinetics400 dataset.

The input data is a video, but I want the output to be the features of the RGB+flow of each frame of this video. How can I do this?

Since I don't have enough SSD space, I'd like to avoid converting the video to rawframes first.

I use the following command

python tools/test.py configs/recognition/i3d/i3d_r50_video_32x2x1_100e_kinetics400_rgb.py checkpoints/i3d_r50_video_32x2x1_100e_kinetics400_rgb.pth --eval top_k_accuracy mean_class_accuracy --out result.json --average-clips prob

The output is an array of 12048. but I hope output is an array of n frames 2048.

yyccli commented 2 years ago

Hi, but can we do that in the word each frame ? I mean a frame is actually a picture, and i think we may need a list of frames or called clips to extract rgb and flow freatures. In fact, flow cannot be extract if you only have one picture. I think you can refer to docs/feature_extraction.md, this may help.

Prot-debug commented 2 years ago

Hi, do you have any ideas to solve this problem? I met this problem for a few days and don't know how to extract the RGB+FLOW feature of each frame, too. Could you plz give me some advice if you sloved it.

ZubairKhan001 commented 2 years ago

@Prot-debug you refer to this page, it has info about optical flow image extraction using denseflow _https://github.com/open-mmlab/mmaction2/blob/master/docs/data_preparation.md_

erfanchy93 commented 1 year ago

This link does not work. Can someone provide the correct working link for this please ?