Commit cde30eaa authored by Olegs NIKISINS's avatar Olegs NIKISINS
Browse files

Added the VideoSvmPadAlgorithm algorithm, and entry points, fixed Replay HLDI

parent ed7e9eb7
Pipeline #9411 failed with stages
in 3 minutes and 4 seconds
This diff is collapsed.
from .VideoSvmPadAlgorithm import VideoSvmPadAlgorithm
def __appropriate__(*args):
"""Says object was actually declared here, and not in the import module.
Fixing sphinx warnings of not being able to find classes, when path is
shortened.
Parameters
----------
*args
The objects that you want sphinx to beleive that are defined here.
Resolves `Sphinx referencing issues <https//github.com/sphinx-
doc/sphinx/issues/3048>`
"""
for obj in args:
obj.__module__ = __name__
__appropriate__(
VideoSvmPadAlgorithm,
)
__all__ = [_ for _ in dir() if not _.startswith('_')]
#!/usr/bin/env python
from bob.pad.face.algorithm import VideoSvmPadAlgorithm
#=======================================================================================
# Define instances here:
machine_type = 'C_SVC'
kernel_type = 'RBF'
n_samples = 10000
trainer_grid_search_params = { 'cost': [2**p for p in range(-5, 16, 2)], 'gamma': [2**p for p in range(-15, 4, 2)]}
# trainer_grid_search_params = { 'cost': [32768], 'gamma': [2] }
mean_std_norm_flag = False
video_svm_pad_algorithm_10k_grid = VideoSvmPadAlgorithm(machine_type = machine_type,
kernel_type = kernel_type,
n_samples = n_samples,
trainer_grid_search_params = trainer_grid_search_params,
mean_std_norm_flag = mean_std_norm_flag)
mean_std_norm_flag = True
video_svm_pad_algorithm_10k_grid_mean_std = VideoSvmPadAlgorithm(machine_type = machine_type,
kernel_type = kernel_type,
n_samples = n_samples,
trainer_grid_search_params = trainer_grid_search_params,
mean_std_norm_flag = mean_std_norm_flag)
\ No newline at end of file
......@@ -20,3 +20,11 @@ video_lbp_histogram_extractor_n8r3 = VideoLBPHistogram(lbptype=lbptype,
circ=circ,
dtype=dtype)
lbptype='uniform'
video_lbp_histogram_extractor_n8r3_uniform = VideoLBPHistogram(lbptype=lbptype,
elbptype=elbptype,
rad=rad,
neighbors=neighbors,
circ=circ,
dtype=dtype)
\ No newline at end of file
......@@ -47,7 +47,7 @@ class ReplayPadFile(PadFile):
# attack_type is a string and I decided to make it like this for this
# particular database. You can do whatever you want for your own database.
super(ReplayPadFile, self).__init__(client_id=f.client, path=f.path,
super(ReplayPadFile, self).__init__(client_id=f.client_id, path=f.path,
attack_type=attack_type, file_id=f.id)
#==========================================================================
......
......@@ -106,6 +106,13 @@ setup(
# registered preprocessors:
'bob.pad.extractor': [
'video-lbp-histogram-extractor-n8r3 = bob.pad.face.config.extractor.video_lbp_histogram:video_lbp_histogram_extractor_n8r3',
'video-lbp-histogram-extractor-n8r3-uniform = bob.pad.face.config.extractor.video_lbp_histogram:video_lbp_histogram_extractor_n8r3_uniform',
],
# registered algorithms:
'bob.pad.algorithm': [
'video-svm-pad-algorithm-10k-grid = bob.pad.face.config.algorithm.video_svm_pad_algorithm:video_svm_pad_algorithm_10k_grid',
'video-svm-pad-algorithm-10k-grid-mean-std = bob.pad.face.config.algorithm.video_svm_pad_algorithm:video_svm_pad_algorithm_10k_grid_mean_std',
],
# registered grid configurations:
......
Markdown is supported
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