diff --git a/bob/pad/face/config/preprocessor/video_sparse_coding.py b/bob/pad/face/config/preprocessor/video_sparse_coding.py index 732ea2305283c9927219f1dfd30bfb7edc83e2c7..525c6de69997bad4e0ee8b2d1d83d6180b5017cd 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) + + +