Commit 201de0c0 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Fix loading of videos

parent c4f06b78
Pipeline #26003 failed with stages
in 17 minutes and 24 seconds
from pkg_resources import resource_filename
from bob.pad.base.database import FileListPadDatabase
from bob.pad.face.database import VideoPadFile
from import FrameSelector
from bob.extension import rc
from import reader
......@@ -72,6 +73,29 @@ class File(VideoPadFile):
return annotations
def load(self, directory=None, extension='.avi',
"""Loads the video file and returns in a
directory : :obj:`str`, optional
The directory to load the data from.
extension : :obj:`str`, optional
The extension of the file to load.
frame_selector : :any:``, optional
Which frames to select.
The loaded frames inside a frame container.
directory = directory or self.original_directory
extension = extension or self.original_extension
return frame_selector(self.make_path(directory, extension))
class Database(FileListPadDatabase):
"""The database interface for the OULU-NPU dataset."""
......@@ -97,6 +121,7 @@ class Database(FileListPadDatabase):
model_ids=model_ids, classes=classes, **kwargs)
for f in files:
f.original_directory = self.original_directory
f.original_extension = self.original_extension
return files
def frames(self, padfile):
Supports Markdown
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