OULU-NPU Database Access in Bob¶
This package provides an interface to the OULU-NPU - a mobile face presentation attack database with real-world variations database. The original data files need to be downloaded separately.After you have downloaded the dataset, you need to configure bob.db.oulunpu to find the dataset:
$ bob config set bob.db.oulunpu.directory /path/to/downloaded/dataset
If you use this database, please cite the following publication:
@INPROCEEDINGS{OULU_NPU_2017,
author = {Boulkenafet, Z. and Komulainen, J. and Li, Lei. and Feng, X. and Hadid, A.},
keywords = {biometrics, face recognition, anti-spoofing, presentation attack, generalization, colour texture},
month = May,
title = {{OULU-NPU}: A mobile face presentation attack database with real-world variations},
journal = {IEEE International Conference on Automatic Face and Gesture Recognition},
year = {2017},
}
Package Documentation¶
-
bob.db.oulunpu.OULUNPU_FRAME_SHAPE= (3, 1920, 1080)¶ Shape of the video frames in the oulunpu database.
-
class
bob.db.oulunpu.Database(original_directory=None, name='oulunpu', pad_file_class=None, original_extension='.avi', **kwargs)¶ Bases:
bob.pad.base.database.FileListPadDatabaseThe database interface for the OULU-NPU dataset.
-
frame_shape¶
-
-
class
bob.db.oulunpu.File(attack_type, client_id, path, file_id=None)¶ Bases:
bob.pad.face.database.VideoPadFileThe file objects of the OULU-NPU dataset.
-
annotations¶ Reads the annotations
Returns: The annotations as a dictionary, e.g.: {'0': {'reye':(re_y,re_x), 'leye':(le_y,le_x)}, ...}Return type: dict
-
frame_shape¶ Returns the size of each frame in this database.
Returns: The (#Channels, Height, Width) which is OULUNPU_FRAME_SHAPE.Return type: (int, int, int)
-
frames¶ Yields the frames of the biofile one by one.
Yields: numpy.array– A frame of the video. The size is (3, 1920, 1080).
-