简体   繁体   中英

Running OpenFace tool on multiple video files via command line

I have downloaded the OpenFace tool for facial landmark extraction. 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.

However, I would like to extract ALL the.flv videos in the ...\CREMA-D\VideoFlash directory at once. 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" . Is there a way to perhaps loop through all the possible files and add this flag using a FOR DO loop?

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

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM