Commit 196240af authored by Guillaume HEUSCH's avatar Guillaume HEUSCH

[helper] corrected one of the convert frames ... function to work with numpy arrays

parent 8354dc0c
......@@ -87,13 +87,17 @@ def convert_list_of_frame_cont_to_array(frame_containers):
An array containing features for all frames of all individuals.
"""
feature_vectors = []
for frame_container in frame_containers:
video_features_array = convert_frame_cont_to_array(
if isinstance( frame_containers[0], bob.bio.video.FrameContainer):
feature_vectors = []
for frame_container in frame_containers:
video_features_array = convert_frame_cont_to_array(
frame_container)
feature_vectors.append(video_features_array)
feature_vectors.append(video_features_array)
else:
feature_vectors = frame_containers
features_array = np.vstack(feature_vectors)
......@@ -478,4 +482,4 @@ def prepare_data_for_hyper_param_grid_search(training_features, n_samples):
real_train, real_cv = split_data_to_train_cv(real_subset)
attack_train, attack_cv = split_data_to_train_cv(attack_subset)
return real_train, real_cv, attack_train, attack_cv
\ No newline at end of file
return real_train, real_cv, attack_train, attack_cv
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment