From 60e13dca0846526a9105d14dce4173b6028317e3 Mon Sep 17 00:00:00 2001 From: Olegs NIKISINS <onikisins@italix03.idiap.ch> Date: Mon, 9 Oct 2017 14:44:38 +0200 Subject: [PATCH] Fixed the path bug in the video_sparse_coding config file --- .../config/preprocessor/video_sparse_coding.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/bob/pad/face/config/preprocessor/video_sparse_coding.py b/bob/pad/face/config/preprocessor/video_sparse_coding.py index 732ea230..525c6de6 100644 --- a/bob/pad/face/config/preprocessor/video_sparse_coding.py +++ b/bob/pad/face/config/preprocessor/video_sparse_coding.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +import os + from bob.pad.face.preprocessor import VideoSparseCoding #======================================================================================= @@ -9,9 +11,13 @@ BLOCK_SIZE = 5 BLOCK_LENGTH = 10 MIN_FACE_SIZE = 50 NORM_FACE_SIZE = 64 -DICTIONARY_FILE_NAMES = ["./dictionaries/dictionary_front_10_5_128.hdf5", - "./dictionaries/dictionary_hor_10_5_128.hdf5", - "./dictionaries/dictionary_vert_10_5_128.hdf5"] + +DICTIONARY_LENGTH = 128 +DIR = os.path.dirname(os.path.abspath(__file__)) + +DICTIONARY_FILE_NAMES = [os.path.join(DIR, "dictionaries", "dictionary_front_10_5_{}.hdf5".format(DICTIONARY_LENGTH)), + os.path.join(DIR, "dictionaries", "dictionary_hor_10_5_{}.hdf5".format(DICTIONARY_LENGTH)), + os.path.join(DIR, "dictionaries", "dictionary_vert_10_5_{}.hdf5".format(DICTIONARY_LENGTH))] FRAME_STEP = 50 # (!) a small number of feature vectors will be computed EXTRACT_HISTOGRAMS_FLAG = True @@ -24,4 +30,7 @@ preprocessor_10_5_128 = VideoSparseCoding(gblock_size = BLOCK_SIZE, dictionary_file_names = DICTIONARY_FILE_NAMES, frame_step = FRAME_STEP, extract_histograms_flag = EXTRACT_HISTOGRAMS_FLAG, - comp_reconstruct_err_flag = COMP_RECONSTRUCT_ERR_FLAG) \ No newline at end of file + comp_reconstruct_err_flag = COMP_RECONSTRUCT_ERR_FLAG) + + + -- GitLab