====== database_config.py contains ======
from bob.db.spoofdb import Database
ORIGINAL_DIRECTORY = "/home/guillermo/databases/SPOOFDB"
ORIGINAL_EXTENSION = ".avi" # extension of the data files
database = Database(original_directory=ORIGINAL_DIRECTORY, original_extension=ORIGINAL_EXTENSION,
protocol='Protocol')
protocol = 'Protocol'
groups = ["train", "dev", "eval"]
====== preprocessor_config.py contains ======
sub_directory = 'results'
from bob.pad.face.preprocessor import FaceCropAlign
from bob.bio.video.preprocessor import Wrapper
from bob.bio.video.utils import FrameSelector
RGB_OUTPUT_FLAG = True # RGB output
USE_FACE_ALIGNMENT = False # use annotations
MAX_IMAGE_SIZE = None # no limiting here
FACE_DETECTION_METHOD = None # use annotations
MIN_FACE_SIZE = 50 # skip small faces
_image_preprocessor = FaceCropAlign(face_size = FACE_SIZE,
rgb_output_flag = RGB_OUTPUT_FLAG,
use_face_alignment = USE_FACE_ALIGNMENT,
max_image_size = MAX_IMAGE_SIZE,
face_detection_method = FACE_DETECTION_METHOD,
min_face_size = MIN_FACE_SIZE)
_frame_selector = FrameSelector(selection_style = "all")
preprocessor = Wrapper(preprocessor = _image_preprocessor,
frame_selector = _frame_selector)
====== buildout configuration file ======
[buildout]
parts = scripts
develop = .
eggs = bob.db.spoofdb
extensions = bob.buildout
newest = false
verbose = true
[scripts]
recipe = bob.buildout:scripts
dependent-scripts = true
===== Interesting Issue ======
Maybe this is not important, but during a testing of the example bob.db.oulunpu using an interactive session (./bin/python) I run the following code:
>>> from bob.db.spoofdb import Database
>>> ORIGINAL_DIRECTORY = "/home/guillermo/databases/SPOOFDB"
>>> db = Database(original_directory=ORIGINAL_DIRECTORY, protocol='Protocol')
>>> all_files = db.objects(protocol='Protocol')
>>> f = all_files[0]
>>> f.number_of_frames
>>> video = f.load()
at this line I got this error:
File "<stdin>", line 1, in <module>
File "/home/guillermo/miniconda2/envs/bob_py3/lib/python3.6/site-packages/bob/pad/face/database/database.py", line 36, in load
return frame_selector(self.make_path(directory, extension))
File "/home/guillermo/miniconda2/envs/bob_py3/lib/python3.6/site-packages/bob/bio/video/utils/FrameSelector.py", line 55, in __call__
data = load_function(data)
File "/home/guillermo/miniconda2/envs/bob_py3/lib/python3.6/site-packages/bob/io/base/__init__.py", line 149, in load
return File(inputs, 'r').read()
RuntimeError: File - constructor: C++ exception caught: 'bob::io::video::avformat_open_input(filename=`train/1_1_01_1.avi') failed: ffmpeg reported -2 == `No such file or directory''
However, I resolved calling the load methods with the original directory as:
>>> video = f.load(ORIGINAL_DIRECTORY)
>>> type(video)
<class 'bob.bio.video.utils.FrameContainer.FrameContainer'>
Is this issue related with the TypeError: all_files() got an unexpected keyword argument 'add_zt_files' I described in the post above or the way to load the data files?
Best,
Guillermo