[英]Running OpenFace tool on multiple video files via command line
I have downloaded the OpenFace tool for facial landmark extraction.我已经下载了用于面部特征提取的OpenFace 工具。 Following the wiki , I am able to extract features of a single video file by running the following on a windows command line interface
./FeatureExtraction.exe -f "...\CREMA-D\VideoFlash\1001_DFA_ANG_XX.flv" -out_dir ".../openface-output"
where -f represents the path of my input file.在wiki之后,我能够通过在 windows 命令行界面上运行以下命令来提取单个视频文件的特征
./FeatureExtraction.exe -f "...\CREMA-D\VideoFlash\1001_DFA_ANG_XX.flv" -out_dir ".../openface-output"
其中 -f 代表我的输入文件的路径。
However, I would like to extract ALL the.flv videos in the ...\CREMA-D\VideoFlash
directory at once.但是,我想一次提取
...\CREMA-D\VideoFlash
目录中的所有 the.flv 视频。 Is there an easy way to do this?是否有捷径可寻?
Edit: It is possible to add multiple -f flags eg ./FeatureExtraction.exe -f "...\CREMA-D\VideoFlash\1001_DFA_ANG_XX.flv" -f "...\CREMA-D\VideoFlash\1002_DFA_ANG_XX.flv" -f "...\CREMA-D\VideoFlash\1003_DFA_ANG_XX.flv" -out_dir ".../openface-output"
.编辑:可以添加多个 -f 标志,例如
./FeatureExtraction.exe -f "...\CREMA-D\VideoFlash\1001_DFA_ANG_XX.flv" -f "...\CREMA-D\VideoFlash\1002_DFA_ANG_XX.flv" -f "...\CREMA-D\VideoFlash\1003_DFA_ANG_XX.flv" -out_dir ".../openface-output"
。 Is there a way to perhaps loop through all the possible files and add this flag using a FOR DO loop?有没有办法遍历所有可能的文件并使用 FOR DO 循环添加此标志?
Or potentially do a for loop of ./FeatureExtraction.exe -f "...\CREMA-D\VideoFlash\[file].flv" -out_dir ".../openface-output"
for each file in a particular directory或者可能为特定目录中的每个文件执行
./FeatureExtraction.exe -f "...\CREMA-D\VideoFlash\[file].flv" -out_dir ".../openface-output"
的 for 循环
My current hackish solution is to start a for loop and iterate through each file in the input location FOR %i IN ("...\CREMA-D\VideoFlash\*") DO.\FeatureExtraction.exe -f %i -out_dir "...\crema-d\openface-output"
我目前的 hackish 解决方案是启动一个 for 循环并遍历输入位置中的每个文件
FOR %i IN ("...\CREMA-D\VideoFlash\*") DO.\FeatureExtraction.exe -f %i -out_dir "...\crema-d\openface-output"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.