added facial tremor variable
This commit is contained in:
@@ -15,7 +15,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
def batch_open_face(filepaths,video_url, input_dir, out_dir, of_path,video_tracking=False):
|
||||
def batch_open_face(filepaths,video_url, input_dir, out_dir, of_path, video_tracking=False):
|
||||
""" Computes open_face features for the files in filepaths
|
||||
|
||||
Args:
|
||||
@@ -31,21 +31,22 @@ def batch_open_face(filepaths,video_url, input_dir, out_dir, of_path,video_track
|
||||
Returns:
|
||||
--------
|
||||
(itreable[str]) list of .csv files
|
||||
"""
|
||||
"""
|
||||
if video_tracking:
|
||||
suffix = '_OF_video_features/'
|
||||
suffix = '_OF_video_features'
|
||||
else:
|
||||
suffix = '_OF_features'
|
||||
|
||||
csv_files = []
|
||||
|
||||
|
||||
for fp in filepaths:
|
||||
try:
|
||||
|
||||
_, out_loc, fl_name = ut.filter_path(video_url, out_dir)
|
||||
full_f_name = fl_name + suffix
|
||||
output_directory = os.path.join(out_loc, full_f_name)
|
||||
|
||||
if not os.path.isdir(output_directory):
|
||||
os.mkdir(output_directory)
|
||||
csv_files.append(ut.compute_open_face_features(fp,output_directory,of_path))
|
||||
|
||||
except Exception as e:
|
||||
@@ -69,7 +70,7 @@ def process_open_face(video_uri, input_dir, out_dir, of_path, dbm_group,video_tr
|
||||
return
|
||||
|
||||
filepaths = [video_uri]
|
||||
csv_filepaths = batch_open_face(filepaths, video_uri, input_dir, out_dir, of_path,video_tracking)
|
||||
csv_filepaths = batch_open_face(filepaths, video_uri, input_dir, out_dir, of_path, video_tracking)
|
||||
|
||||
except Exception as e:
|
||||
logger.error('Failed to process video file')
|
||||
|
||||
Reference in New Issue
Block a user