foldername update
This commit is contained in:
@@ -18,7 +18,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
formant_dir = 'audio/formant_freq'
|
||||
formant_dir = 'acoustic/formant_freq'
|
||||
csv_ext = '_formant.csv'
|
||||
error_txt = 'error: length less than 0.064'
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
gne_dir = 'audio/glottal_noise'
|
||||
ff_dir = 'audio/pitch'
|
||||
gne_dir = 'acoustic/glottal_noise'
|
||||
ff_dir = 'acoustic/pitch'
|
||||
csv_ext = '_gne.csv'
|
||||
|
||||
def gne_ratio(sound):
|
||||
|
||||
@@ -18,7 +18,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
hnr_dir = 'audio/harmonic_noise'
|
||||
hnr_dir = 'acoustic/harmonic_noise'
|
||||
csv_ext = '_hnr.csv'
|
||||
error_txt = 'error: length less than 0.064'
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
intensity_dir = 'audio/intensity'
|
||||
intensity_dir = 'acoustic/intensity'
|
||||
csv_ext = '_intensity.csv'
|
||||
error_txt = 'error: length less than 0.064'
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
jitter_dir = 'audio/jitter'
|
||||
ff_dir = 'audio/pitch'
|
||||
jitter_dir = 'acoustic/jitter'
|
||||
ff_dir = 'acoustic/pitch'
|
||||
csv_ext = '_jitter.csv'
|
||||
|
||||
def audio_jitter(sound):
|
||||
|
||||
@@ -19,7 +19,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
mfcc_dir = 'audio/mfcc'
|
||||
mfcc_dir = 'acoustic/mfcc'
|
||||
csv_ext = '_mfcc.csv'
|
||||
error_txt = 'error: length less than 0.064'
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
pause_seg_dir = 'audio/pause_segment'
|
||||
pause_seg_dir = 'acoustic/pause_segment'
|
||||
csv_ext = '_pausechar.csv'
|
||||
|
||||
def get_timing_cues(seg_starts_sec, seg_ends_sec, r_config):
|
||||
|
||||
@@ -18,7 +18,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
ff_dir = 'audio/pitch'
|
||||
ff_dir = 'acoustic/pitch'
|
||||
csv_ext = '_pitch.csv'
|
||||
error_txt = 'error: length less than 0.064'
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
shimmer_dir = 'audio/shimmer'
|
||||
ff_dir = 'audio/pitch'
|
||||
shimmer_dir = 'acoustic/shimmer'
|
||||
ff_dir = 'acoustic/pitch'
|
||||
csv_ext = '_shimmer.csv'
|
||||
|
||||
def audio_shimmer(sound):
|
||||
|
||||
@@ -17,7 +17,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
vfs_dir = 'audio/voice_frame_score'
|
||||
vfs_dir = 'acoustic/voice_frame_score'
|
||||
csv_ext = '_voiceprev.csv'
|
||||
error_txt = 'error: length less than 0.064'
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ def run_eye_gaze(video_uri, out_dir, r_config):
|
||||
|
||||
#filtering path to generate input & output path
|
||||
input_loc, out_loc, fl_name = ut.filter_path(video_uri, out_dir)
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_OF_features/*.csv'))
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_openface/*.csv'))
|
||||
|
||||
if len(of_csv_path)>0:
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ def fac_tremor_process(video_uri, out_dir, r_config, model_output=False):
|
||||
# try:
|
||||
|
||||
input_loc, out_loc, fl_name = ut.filter_path(video_uri, out_dir)
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_OF_video_features/*.csv'))
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_openface_lmk/*.csv'))
|
||||
|
||||
if len(of_csv_path)>0:
|
||||
of_csv = of_csv_path[0]
|
||||
|
||||
@@ -182,7 +182,7 @@ def run_head_movement(video_uri, out_dir, r_config):
|
||||
|
||||
#filtering path to generate input & output path
|
||||
input_loc, out_loc, fl_name = ut.filter_path(video_uri, out_dir)
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_OF_features/*.csv'))
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_openface/*.csv'))
|
||||
|
||||
|
||||
if len(of_csv_path)>0:
|
||||
|
||||
@@ -18,9 +18,9 @@ from dbm_lib.dbm_features.raw_features.util import nlp_util as n_util
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
speech_dir = 'nlp/speech_feature'
|
||||
speech_dir = 'speech/speech_feature'
|
||||
speech_ext = '_nlp.csv'
|
||||
transcribe_ext = 'nlp/transcribe/*_transcribe.csv'
|
||||
transcribe_ext = 'speech/deepspeech/*_transcribe.csv'
|
||||
|
||||
def run_speech_feature(video_uri, out_dir, r_config, tran_tog):
|
||||
"""
|
||||
|
||||
@@ -17,7 +17,7 @@ from dbm_lib.dbm_features.raw_features.util import nlp_util as n_util
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
formant_dir = 'nlp/transcribe'
|
||||
formant_dir = 'speech/deepspeech'
|
||||
csv_ext = '_transcribe.csv'
|
||||
error_txt = 'error: length less than 0.1'
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ def compute_open_face_features(input_filepath,
|
||||
|
||||
bn, _ = os.path.splitext(os.path.basename(input_filepath))
|
||||
if not output_directory:
|
||||
output_directory = os.path.join(os.path.dirname(input_filepath), bn + '_OF_features')
|
||||
output_directory = os.path.join(os.path.dirname(input_filepath), bn + '_openface')
|
||||
|
||||
output_csv = os.path.join(output_directory, bn + '.csv')
|
||||
if not os.path.isfile(output_csv) or clobber:
|
||||
|
||||
@@ -25,7 +25,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
face_asym_dir = 'video/face_asymmetry'
|
||||
face_asym_dir = 'facial/face_asymmetry'
|
||||
csv_ext = '_facasym.csv'
|
||||
|
||||
cv2_color_purple = (254,19,188)
|
||||
@@ -339,7 +339,7 @@ def run_face_asymmetry(video_uri, out_dir, f_cfg):
|
||||
cfr = ConfigFaceReader()
|
||||
input_loc, out_loc, fl_name = ut.filter_path(video_uri, out_dir)
|
||||
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_OF_features/*.csv'))
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_openface/*.csv'))
|
||||
if len(of_csv_path)>0:
|
||||
|
||||
of_csv = of_csv_path[0]
|
||||
|
||||
@@ -19,7 +19,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
face_au_dir = 'video/face_au'
|
||||
face_au_dir = 'facial/face_au'
|
||||
csv_ext = '_facau.csv'
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ def run_face_au(video_uri, out_dir, f_cfg):
|
||||
cfr = ConfigFaceReader()
|
||||
input_loc, out_loc, fl_name = ut.filter_path(video_uri, out_dir)
|
||||
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_OF_features/*.csv'))
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_openface/*.csv'))
|
||||
if len(of_csv_path)>0:
|
||||
|
||||
df_of = pd.read_csv(of_csv_path[0], error_bad_lines=False)
|
||||
|
||||
@@ -19,7 +19,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
face_expr_dir = 'video/face_expressivity'
|
||||
face_expr_dir = 'facial/face_expressivity'
|
||||
csv_ext = '_facemo.csv'
|
||||
|
||||
#Openface feature extraction
|
||||
@@ -69,7 +69,7 @@ def run_face_expressivity(video_uri, out_dir, f_cfg):
|
||||
cfr = ConfigFaceReader()
|
||||
input_loc, out_loc, fl_name = ut.filter_path(video_uri, out_dir)
|
||||
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_OF_features/*.csv'))
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_openface/*.csv'))
|
||||
if len(of_csv_path)>0:
|
||||
|
||||
df_of = pd.read_csv(of_csv_path[0], error_bad_lines=False)
|
||||
|
||||
@@ -19,7 +19,7 @@ from dbm_lib.dbm_features.raw_features.util import util as ut
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger=logging.getLogger()
|
||||
|
||||
face_lmk_dir = 'video/face_landmark'
|
||||
face_lmk_dir = 'facial/face_landmark'
|
||||
csv_ext = '_faclmk.csv'
|
||||
|
||||
def extract_col_nm_lmk(cols):
|
||||
@@ -98,7 +98,7 @@ def run_face_landmark(video_uri, out_dir, f_cfg):
|
||||
cfr = ConfigFaceReader()
|
||||
input_loc, out_loc, fl_name = ut.filter_path(video_uri, out_dir)
|
||||
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_OF_features/*.csv'))
|
||||
of_csv_path = glob.glob(join(out_loc, fl_name + '_openface/*.csv'))
|
||||
if len(of_csv_path)>0:
|
||||
|
||||
df_of = pd.read_csv(of_csv_path[0], error_bad_lines=False)
|
||||
|
||||
@@ -33,9 +33,9 @@ def batch_open_face(filepaths,video_url, input_dir, out_dir, of_path, video_trac
|
||||
(itreable[str]) list of .csv files
|
||||
"""
|
||||
if video_tracking:
|
||||
suffix = '_OF_video_features'
|
||||
suffix = '_openface_lmk'
|
||||
else:
|
||||
suffix = '_OF_features'
|
||||
suffix = '_openface'
|
||||
|
||||
csv_files = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user