Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.bio.vein
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.bio.vein
Commits
d7432c9d
Commit
d7432c9d
authored
Jul 11, 2016
by
André Anjos
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[many] More clean-ups and code re-organization
parent
331df584
Changes
54
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
914 additions
and
1201 deletions
+914
-1201
README.rst
README.rst
+0
-1
bob/bio/vein/algorithms/HammingDistance.py
bob/bio/vein/algorithms/HammingDistance.py
+0
-73
bob/bio/vein/algorithms/MiuraMatch.py
bob/bio/vein/algorithms/MiuraMatch.py
+26
-23
bob/bio/vein/algorithms/__init__.py
bob/bio/vein/algorithms/__init__.py
+0
-6
bob/bio/vein/configurations/__init__.py
bob/bio/vein/configurations/__init__.py
+0
-11
bob/bio/vein/configurations/algorithms.py
bob/bio/vein/configurations/algorithms.py
+8
-38
bob/bio/vein/configurations/databases/__init__.py
bob/bio/vein/configurations/databases/__init__.py
+0
-5
bob/bio/vein/configurations/databases/utfvp.py
bob/bio/vein/configurations/databases/utfvp.py
+7
-5
bob/bio/vein/configurations/databases/vera.py
bob/bio/vein/configurations/databases/vera.py
+7
-5
bob/bio/vein/configurations/extractors/__init__.py
bob/bio/vein/configurations/extractors/__init__.py
+0
-5
bob/bio/vein/configurations/extractors/lbp.py
bob/bio/vein/configurations/extractors/lbp.py
+14
-16
bob/bio/vein/configurations/extractors/maximum_curvature.py
bob/bio/vein/configurations/extractors/maximum_curvature.py
+4
-4
bob/bio/vein/configurations/extractors/normalised_crosscorr.py
...io/vein/configurations/extractors/normalised_crosscorr.py
+2
-9
bob/bio/vein/configurations/extractors/repeated_line_tracking.py
.../vein/configurations/extractors/repeated_line_tracking.py
+13
-12
bob/bio/vein/configurations/extractors/wide_line_detector.py
bob/bio/vein/configurations/extractors/wide_line_detector.py
+5
-6
bob/bio/vein/configurations/grid/__init__.py
bob/bio/vein/configurations/grid/__init__.py
+0
-5
bob/bio/vein/configurations/grid/demanding.py
bob/bio/vein/configurations/grid/demanding.py
+22
-21
bob/bio/vein/configurations/grid/gbu.py
bob/bio/vein/configurations/grid/gbu.py
+21
-21
bob/bio/vein/configurations/grid/gpu.py
bob/bio/vein/configurations/grid/gpu.py
+21
-22
bob/bio/vein/configurations/grid/gpu2.py
bob/bio/vein/configurations/grid/gpu2.py
+22
-22
bob/bio/vein/configurations/grid/gpu3.py
bob/bio/vein/configurations/grid/gpu3.py
+21
-22
bob/bio/vein/configurations/grid/grid.py
bob/bio/vein/configurations/grid/grid.py
+4
-4
bob/bio/vein/configurations/grid/large.py
bob/bio/vein/configurations/grid/large.py
+0
-26
bob/bio/vein/configurations/grid/local.py
bob/bio/vein/configurations/grid/local.py
+10
-11
bob/bio/vein/configurations/grid/small.py
bob/bio/vein/configurations/grid/small.py
+0
-18
bob/bio/vein/configurations/grid/very_demanding.py
bob/bio/vein/configurations/grid/very_demanding.py
+22
-21
bob/bio/vein/configurations/preprocessors/__init__.py
bob/bio/vein/configurations/preprocessors/__init__.py
+0
-5
bob/bio/vein/configurations/preprocessors/finger_crop_None_CircGabor.py
...onfigurations/preprocessors/finger_crop_None_CircGabor.py
+13
-15
bob/bio/vein/configurations/preprocessors/finger_crop_None_HE.py
.../vein/configurations/preprocessors/finger_crop_None_HE.py
+13
-15
bob/bio/vein/configurations/preprocessors/finger_crop_None_HFE.py
...vein/configurations/preprocessors/finger_crop_None_HFE.py
+14
-15
bob/bio/vein/configurations/preprocessors/finger_crop_None_None.py
...ein/configurations/preprocessors/finger_crop_None_None.py
+14
-15
bob/bio/vein/extractors/LocalBinaryPatterns.py
bob/bio/vein/extractors/LocalBinaryPatterns.py
+3
-2
bob/bio/vein/extractors/MaximumCurvature.py
bob/bio/vein/extractors/MaximumCurvature.py
+0
-1
bob/bio/vein/extractors/NormalisedCrossCorrelation.py
bob/bio/vein/extractors/NormalisedCrossCorrelation.py
+0
-1
bob/bio/vein/extractors/PrincipalCurvature.py
bob/bio/vein/extractors/PrincipalCurvature.py
+2
-2
bob/bio/vein/extractors/RepeatedLineTracking.py
bob/bio/vein/extractors/RepeatedLineTracking.py
+0
-1
bob/bio/vein/extractors/WideLineDetector.py
bob/bio/vein/extractors/WideLineDetector.py
+3
-4
bob/bio/vein/preprocessors/FingerCrop.py
bob/bio/vein/preprocessors/FingerCrop.py
+179
-184
bob/bio/vein/preprocessors/__init__.py
bob/bio/vein/preprocessors/__init__.py
+0
-7
bob/bio/vein/script/__init__.py
bob/bio/vein/script/__init__.py
+0
-11
bob/bio/vein/script/fingerveinverify.py
bob/bio/vein/script/fingerveinverify.py
+0
-25
bob/bio/vein/script/scores2spoofingfile.py
bob/bio/vein/script/scores2spoofingfile.py
+0
-104
bob/bio/vein/tests/__init__.py
bob/bio/vein/tests/__init__.py
+0
-6
bob/bio/vein/tests/test.py
bob/bio/vein/tests/test.py
+137
-165
buildout.cfg
buildout.cfg
+2
-8
doc/conf.py
doc/conf.py
+0
-4
doc/contribute.rst
doc/contribute.rst
+159
-77
doc/evaluate.rst
doc/evaluate.rst
+92
-37
doc/experiments.rst
doc/experiments.rst
+49
-34
doc/index.rst
doc/index.rst
+1
-2
doc/installation.rst
doc/installation.rst
+2
-3
doc/references.rst
doc/references.rst
+0
-1
doc/satellite.rst
doc/satellite.rst
+0
-1
setup.py
setup.py
+2
-44
No files found.
README.rst
View file @
d7432c9d
.. vim: set fileencoding=utf-8 :
.. Andre Anjos <andre.anjos@idiap.ch>
.. Fri 08 Jul 2016 15:38:56 CEST
.. image:: http://img.shields.io/badge/docs-stable-yellow.png
...
...
bob/bio/vein/algorithms/HammingDistance.py
deleted
100644 → 0
View file @
331df584
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
import
bob.ip.base
import
bob.sp
import
numpy
import
math
import
scipy.signal
from
facereclib.tools.Tool
import
Tool
class
MiuraMatch
(
Tool
):
"""Finger vein matching: match ratio based on
N. Miura, A. Nagasaka, and T. Miyatake. Feature extraction of finger vein patterns based on repeated line tracking and its application
to personal identification. Machine Vision and Applications, Vol. 15, Num. 4, pp. 194--203, 2004
"""
def
__init__
(
self
,
# some similarity functions might need a GaborWaveletTransform class, so we have to provide the parameters here as well...
ch
=
8
,
# Maximum search displacement in y-direction
cw
=
5
,
# Maximum search displacement in x-direction
gpu
=
False
,
):
# call base class constructor
Tool
.
__init__
(
self
,
ch
=
ch
,
cw
=
cw
,
multiple_model_scoring
=
None
,
multiple_probe_scoring
=
None
)
self
.
ch
=
ch
self
.
cw
=
cw
self
.
gpu
=
gpu
def
enroll
(
self
,
enroll_features
):
"""Enrolls the model by computing an average graph for each model"""
# return the generated model
return
numpy
.
vstack
(
enroll_features
)
def
score
(
self
,
model
,
probe
):
"""Computes the score of the probe and the model
Return score - Value between 0 and 0.5, larger value is better match
"""
I
=
probe
.
astype
(
numpy
.
float64
)
R
=
model
.
astype
(
numpy
.
float64
)
h
,
w
=
R
.
shape
crop_R
=
R
[
self
.
ch
:
h
-
self
.
ch
,
self
.
cw
:
w
-
self
.
cw
]
rotate_R
=
numpy
.
zeros
((
crop_R
.
shape
[
0
],
crop_R
.
shape
[
1
]))
bob
.
ip
.
base
.
rotate
(
crop_R
,
rotate_R
,
180
)
#FFT for scoring!
#Nm=bob.sp.ifft(bob.sp.fft(I)*bob.sp.fft(rotate_R))
if
self
.
gpu
==
True
:
import
xbob.cusp
Nm
=
xbob
.
cusp
.
conv
(
I
,
rotate_R
);
else
:
Nm
=
scipy
.
signal
.
convolve2d
(
I
,
rotate_R
,
'valid'
);
t0
,
s0
=
numpy
.
unravel_index
(
Nm
.
argmax
(),
Nm
.
shape
)
Nmm
=
Nm
[
t0
,
s0
]
#Nmm = Nm.max()
#mi = numpy.argwhere(Nmm == Nm)
#t0, s0 = mi.flatten()[:2]
score
=
Nmm
/
(
sum
(
sum
(
crop_R
))
+
sum
(
sum
(
I
[
t0
:
t0
+
h
-
2
*
self
.
ch
,
s0
:
s0
+
w
-
2
*
self
.
cw
])))
return
score
bob/bio/vein/algorithms/MiuraMatch.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
import
bob.sp
import
bob.ip.base
...
...
@@ -9,24 +8,27 @@ import numpy
import
math
import
scipy.signal
from
facereclib.tools.Tool
import
Tool
from
bob.bio.base.algorithm
import
Algorithm
class
MiuraMatch
(
Tool
):
"""Finger vein matching: match ratio based on
N. Miura, A. Nagasaka, and T. Miyatake. Feature extraction of finger vein patterns based on repeated line tracking and its application
to personal identification. Machine Vision and Applications, Vol. 15, Num. 4, pp. 194--203, 2004
class
MiuraMatch
(
Algorithm
):
"""Finger vein matching: match ratio
Based on N. Miura, A. Nagasaka, and T. Miyatake. Feature extraction of finger
vein patterns based on repeated line tracking and its application to personal
identification. Machine Vision and Applications, Vol. 15, Num. 4, pp.
194--203, 2004
"""
def
__init__
(
self
,
def
__init__
(
self
,
# some similarity functions might need a GaborWaveletTransform class, so we have to provide the parameters here as well...
ch
=
8
,
# Maximum search displacement in y-direction
cw
=
5
,
# Maximum search displacement in x-direction
gpu
=
False
,
):
):
# call base class constructor
Tool
.
__init__
(
Algorithm
.
__init__
(
self
,
ch
=
ch
,
...
...
@@ -40,8 +42,10 @@ class MiuraMatch (Tool):
self
.
cw
=
cw
self
.
gpu
=
gpu
def
enroll
(
self
,
enroll_features
):
"""Enrolls the model by computing an average graph for each model"""
# return the generated model
#import ipdb; ipdb.set_trace()
return
numpy
.
array
(
enroll_features
)
...
...
@@ -52,7 +56,7 @@ class MiuraMatch (Tool):
size_t
=
numpy
.
array
(
t
.
shape
)
size_a
=
numpy
.
array
(
a
.
shape
)
outsize
=
size_t
+
size_a
-
1
# Determine 2D cross correlation in Fourier domain
taux
=
numpy
.
zeros
(
outsize
)
taux
[
0
:
size_t
[
0
],
0
:
size_t
[
1
]]
=
t
...
...
@@ -60,12 +64,12 @@ class MiuraMatch (Tool):
aaux
=
numpy
.
zeros
(
outsize
)
aaux
[
0
:
size_a
[
0
],
0
:
size_a
[
1
]]
=
a
Fa
=
bob
.
sp
.
fft
(
aaux
.
astype
(
numpy
.
complex128
))
convta
=
numpy
.
real
(
bob
.
sp
.
ifft
(
Ft
*
Fa
))
[
w
,
h
]
=
size_t
-
size_a
+
1
output
=
convta
[
size_a
[
0
]
-
1
:
size_a
[
0
]
-
1
+
w
,
size_a
[
1
]
-
1
:
size_a
[
1
]
-
1
+
h
]
return
output
...
...
@@ -75,12 +79,12 @@ class MiuraMatch (Tool):
"""
#print model.shape
#print probe.shape
I
=
probe
.
astype
(
numpy
.
float64
)
if
len
(
model
.
shape
)
==
2
:
if
len
(
model
.
shape
)
==
2
:
model
=
numpy
.
array
([
model
])
n_models
=
model
.
shape
[
0
]
scores
=
[]
...
...
@@ -90,7 +94,7 @@ class MiuraMatch (Tool):
crop_R
=
R
[
self
.
ch
:
h
-
self
.
ch
,
self
.
cw
:
w
-
self
.
cw
]
rotate_R
=
numpy
.
zeros
((
crop_R
.
shape
[
0
],
crop_R
.
shape
[
1
]))
bob
.
ip
.
base
.
rotate
(
crop_R
,
rotate_R
,
180
)
#FFT for scoring!
#FFT for scoring!
#Nm=bob.sp.ifft(bob.sp.fft(I)*bob.sp.fft(rotate_R))
if
self
.
gpu
==
True
:
Nm
=
self
.
convfft
(
I
,
rotate_R
)
...
...
@@ -99,13 +103,12 @@ class MiuraMatch (Tool):
else
:
Nm
=
self
.
convfft
(
I
,
rotate_R
)
#Nm2 = scipy.signal.convolve2d(I, rotate_R, 'valid')
t0
,
s0
=
numpy
.
unravel_index
(
Nm
.
argmax
(),
Nm
.
shape
)
Nmm
=
Nm
[
t0
,
s0
]
#Nmm = Nm.max()
#mi = numpy.argwhere(Nmm == Nm)
#mi = numpy.argwhere(Nmm == Nm)
#t0, s0 = mi.flatten()[:2]
scores
.
append
(
Nmm
/
(
sum
(
sum
(
crop_R
))
+
sum
(
sum
(
I
[
t0
:
t0
+
h
-
2
*
self
.
ch
,
s0
:
s0
+
w
-
2
*
self
.
cw
]))))
return
numpy
.
mean
(
scores
)
bob/bio/vein/algorithms/__init__.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
"""Tool chain for computing verification scores"""
from
MiuraMatch
import
MiuraMatch
bob/bio/vein/configurations/__init__.py
View file @
d7432c9d
#!/usr/bin/env python
# Pedro Tome <Pedro.Tome@idiap.ch>
"""Configuration files for different steps of the fingervein recognition tool chain"""
import
databases
import
preprocessing
import
features
import
tools
import
grid
bob/bio/vein/configurations/algorithms.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import
facereclib
from
..
import
tools
as
fingervein_tools
huangwl_tool
=
fingervein_tools
.
MiuraMatch
(
ch
=
18
,
cw
=
28
,
)
huangwl_gpu_tool
=
fingervein_tools
.
MiuraMatch
(
ch
=
18
,
cw
=
28
,
gpu
=
True
,
)
miuramax_tool
=
fingervein_tools
.
MiuraMatch
(
ch
=
80
,
cw
=
90
,
)
miuramax_gpu_tool
=
fingervein_tools
.
MiuraMatch
(
ch
=
80
,
cw
=
90
,
gpu
=
True
,
)
miurarlt_tool
=
fingervein_tools
.
MiuraMatch
(
ch
=
65
,
cw
=
55
,
)
miurarlt_gpu_tool
=
fingervein_tools
.
MiuraMatch
(
ch
=
65
,
cw
=
55
,
gpu
=
True
,
)
from
..algorithms
import
MiuraMatch
huangwl_tool
=
MiuraMatch
(
ch
=
18
,
cw
=
28
)
huangwl_gpu_tool
=
MiuraMatch
(
ch
=
18
,
cw
=
28
,
gpu
=
True
)
miuramax_tool
=
MiuraMatch
(
ch
=
80
,
cw
=
90
)
miuramax_gpu_tool
=
MiuraMatch
(
ch
=
80
,
cw
=
90
,
gpu
=
True
)
miurarlt_tool
=
MiuraMatch
(
ch
=
65
,
cw
=
55
)
miurarlt_gpu_tool
=
MiuraMatch
(
ch
=
65
,
cw
=
55
,
gpu
=
True
)
bob/bio/vein/configurations/databases/__init__.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <pedro.tome@idiap.ch>
"""Configuration files for image databases"""
bob/bio/vein/configurations/databases/utfvp.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import
bob.db.utfvp
import
facereclib
from
bob.bio.base.database
import
DatabaseBob
utfvp_directory
=
"/idiap/resource/database/UTFVP/data/"
database
=
facereclib
.
databases
.
DatabaseBob
(
database
=
DatabaseBob
(
database
=
bob
.
db
.
utfvp
.
Database
(
original_directory
=
utfvp_directory
,
original_extension
=
".png"
),
name
=
'utfvp'
,
)
),
name
=
'utfvp'
,
)
bob/bio/vein/configurations/databases/vera.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import
bob.db.vera
import
facereclib
from
bob.bio.base.database
import
DatabaseBob
vera_directory
=
"/idiap/project/vera"
database
=
facereclib
.
databases
.
DatabaseBob
(
database
=
DatabaseBob
(
database
=
bob
.
db
.
vera
.
Database
(
original_directory
=
vera_directory
,
original_extension
=
".png"
,
),
original_extension
=
".png"
,
),
name
=
'vera'
,
)
\ No newline at end of file
)
bob/bio/vein/configurations/extractors/__init__.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
"""Configuration files for feature extractors"""
bob/bio/vein/configurations/extractors/lbp.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
import
bob.fingervein
from
...extractors
import
LocalBinaryPatterns
# Parameters
...
...
@@ -18,25 +17,24 @@ LBP_CIRCULAR = True
LBP_ROTATION_INVARIANT
=
False
LBP_COMPARE_TO_AVERAGE
=
False
LBP_ADD_AVERAGE
=
False
# histogram options
SPARSE_HISTOGRAM
=
False
SPLIT_HISTOGRAM
=
None
#Define feature extractor
feature_extractor
=
bob
.
fingervein
.
features
.
LocalBinaryPatterns
(
block_size
=
BLOCK_SIZE
,
# one or two parameters for block size
block_overlap
=
BLOCK_OVERLAP
,
# one or two parameters for block overlap
lbp_radius
=
LBP_RADIUS
,
lbp_neighbor_count
=
LBP_NEIGHBOR_COUNT
,
lbp_uniform
=
LBP_UNIFORM
,
lbp_circular
=
LBP_CIRCULAR
,
lbp_rotation_invariant
=
LBP_ROTATION_INVARIANT
,
lbp_compare_to_average
=
LBP_COMPARE_TO_AVERAGE
,
lbp_add_average
=
LBP_ADD_AVERAGE
,
feature_extractor
=
LocalBinaryPatterns
(
block_size
=
BLOCK_SIZE
,
# one or two parameters for block size
block_overlap
=
BLOCK_OVERLAP
,
# one or two parameters for block overlap
lbp_radius
=
LBP_RADIUS
,
lbp_neighbor_count
=
LBP_NEIGHBOR_COUNT
,
lbp_uniform
=
LBP_UNIFORM
,
lbp_circular
=
LBP_CIRCULAR
,
lbp_rotation_invariant
=
LBP_ROTATION_INVARIANT
,
lbp_compare_to_average
=
LBP_COMPARE_TO_AVERAGE
,
lbp_add_average
=
LBP_ADD_AVERAGE
,
# histogram options
sparse_histogram
=
SPARSE_HISTOGRAM
,
split_histogram
=
SPLIT_HISTOGRAM
sparse_histogram
=
SPARSE_HISTOGRAM
,
split_histogram
=
SPLIT_HISTOGRAM
)
bob/bio/vein/configurations/extractors/maximum_curvature.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
import
bob.fingervein
from
...extractors
import
LocalBinaryPatterns
# Parameters
# Parameters
SIGMA_DERIVATES
=
5
#Sigma used for determining derivatives
GPU_ACCELERATION
=
False
...
...
@@ -13,6 +13,6 @@ GPU_ACCELERATION = False
feature_extractor
=
bob
.
fingervein
.
features
.
MaximumCurvature
(
sigma
=
SIGMA_DERIVATES
,
gpu
=
GPU_ACCELERATION
)
bob/bio/vein/configurations/extractors/normalised_crosscorr.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
import
bob.fingervein
# Parameters
#Define feature extractor
feature_extractor
=
bob
.
fingervein
.
features
.
NormalisedCrossCorrelation
(
)
from
...extractors
import
NormalisedCrossCorrelation
feature_extractor
=
bob
.
fingervein
.
features
.
NormalisedCrossCorrelation
()
bob/bio/vein/configurations/extractors/repeated_line_tracking.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
import
bob.fingervein
from
...extractors
import
RepeatedLineTracking
# Parameters
NUMBER_ITERATIONS
=
3000
# Maximum number of iterations
DISTANCE_R
=
1
# Distance between tracking point and cross section of the profile
PROFILE_WIDTH
=
21
# Width of profile
# Maximum number of iterations
NUMBER_ITERATIONS
=
3000
# Distance between tracking point and cross section of profile
DISTANCE_R
=
1
#Define feature extractor
feature_extractor
=
bob
.
fingervein
.
features
.
RepeatedLineTracking
(
iterations
=
NUMBER_ITERATIONS
,
r
=
DISTANCE_R
,
profile_w
=
PROFILE_WIDTH
)
# Width of profile
PROFILE_WIDTH
=
21
feature_extractor
=
RepeatedLineTracking
(
iterations
=
NUMBER_ITERATIONS
,
r
=
DISTANCE_R
,
profile_w
=
PROFILE_WIDTH
)
bob/bio/vein/configurations/extractors/wide_line_detector.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
import
bob.fingervein
# Parameters
RADIUS_NEIGHBOURHOOD_REGION
=
5
# Radius of the circular neighbourhood region
NEIGHBOURHOOD_THRESHOLD
=
1
SUM_NEIGHBOURHOOD
=
41
#Sum of neigbourhood threshold
NEIGHBOURHOOD_THRESHOLD
=
1
SUM_NEIGHBOURHOOD
=
41
#Sum of neigbourhood threshold
RESCALE
=
True
#Define feature extractor
feature_extractor
=
bob
.
fingervein
.
features
.
WideLineDetector
(
radius
=
RADIUS_NEIGHBOURHOOD_REGION
,
radius
=
RADIUS_NEIGHBOURHOOD_REGION
,
threshold
=
NEIGHBOURHOOD_THRESHOLD
,
g
=
SUM_NEIGHBOURHOOD
,
rescale
=
RESCALE
g
=
SUM_NEIGHBOURHOOD
,
rescale
=
RESCALE
)
bob/bio/vein/configurations/grid/__init__.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
"""Configuration files for SGE grid executions"""
bob/bio/vein/configurations/grid/demanding.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import
facereclib
# define a queue with demanding parameters
grid
=
facereclib
.
utils
.
GridParameters
(
training_queue
=
'32G'
,
# preprocessing
number_of_preprocessings_per_job
=
200
,
preprocessing_queue
=
'4G'
,
# feature extraction
number_of_extracted_features_per_job
=
200
,
extraction_queue
=
'8G'
,
# feature projection
number_of_projected_features_per_job
=
200
,
projection_queue
=
'8G'
,
# model enrollment
number_of_enrolled_models_per_job
=
10
,
enrollment_queue
=
'8G'
,
# scoring
number_of_models_per_scoring_job
=
10
,
scoring_queue
=
'8G'
)
import
bob.bio.base.grid
import
Grid
grid
=
Grid
(
training_queue
=
'32G'
,
number_of_preprocessings_per_job
=
200
,
preprocessing_queue
=
'4G'
,
number_of_extraction_jobs
=
200
,
extraction_queue
=
'8G'
,
number_of_projection_jobs
=
200
,
projection_queue
=
'8G'
,
number_of_enrollment_jobs
=
10
,
enrollment_queue
=
'8G'
,
number_of_scoring_jobs
=
10
,
scoring_queue
=
'8G'
,
)
bob/bio/vein/configurations/grid/gbu.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import
facereclib
# define a queue specifically for the xbob.db.gbu database
grid
=
facereclib
.
utils
.
GridParameters
(
training_queue
=
'32G'
,
# preprocessing
number_of_preprocessings_per_job
=
1000
,
preprocessing_queue
=
'8G'
,
# feature extraction
number_of_extracted_features_per_job
=
100
,
extraction_queue
=
'8G'
,
# feature projection
number_of_projected_features_per_job
=
100
,
projection_queue
=
'8G'
,
# model enrollment
number_of_enrolled_models_per_job
=
100
,
enrollment_queue
=
'8G'
,
# scoring
number_of_models_per_scoring_job
=
10
,
scoring_queue
=
'8G'
)
import
bob.bio.base.grid
import
Grid
grid
=
Grid
(
training_queue
=
'32G'
,
number_of_preprocessing_jobs
=
1000
,
preprocessing_queue
=
'8G'
,
number_of_extraction_jobs
=
100
,
extraction_queue
=
'8G'
,
number_of_projection_jobs
=
100
,
projection_queue
=
'8G'
,
number_of_enrollment_jobs
=
100
,
enrollment_queue
=
'8G'
,
number_of_scoring_jobs
=
10
,
scoring_queue
=
'8G'
)
bob/bio/vein/configurations/grid/gpu.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import
facereclib
# setup of the grid parameters
# define a queue with demanding parameters
grid
=
facereclib
.
utils
.
GridParameters
(
training_queue
=
'8G'
,
# preprocessing
number_of_preprocessing_jobs
=
32
,
preprocessing_queue
=
'4G-io-big'
,
# feature extraction
number_of_extraction_jobs
=
32
,
extraction_queue
=
'4G-io-big'
,
# feature projection
number_of_projection_jobs
=
32
,
projection_queue
=
{},
# model enrollment
number_of_enrollment_jobs
=
32
,
enrollment_queue
=
{},
# scoring
number_of_scoring_jobs
=
32
,
scoring_queue
=
{
'queue'
:
'q_gpu'
},
)
import
bob.bio.base.grid
import
Grid
grid
=
Grid
(
training_queue
=
'8G'
,
number_of_preprocessing_jobs
=
32
,
preprocessing_queue
=
'4G-io-big'
,
number_of_extraction_jobs
=
32
,
extraction_queue
=
'4G-io-big'
,
number_of_projection_jobs
=
32
,
projection_queue
=
{},
number_of_enrollment_jobs
=
32
,
enrollment_queue
=
{},
number_of_scoring_jobs
=
32
,
scoring_queue
=
{
'queue'
:
'q_gpu'
},
)
bob/bio/vein/configurations/grid/gpu2.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import
facereclib
# setup of the grid parameters
# define a queue with demanding parameters
grid
=
facereclib
.
utils
.
GridParameters
(
training_queue
=
'8G'
,
# preprocessing
number_of_preprocessing_jobs
=
32
,
preprocessing_queue
=
'4G-io-big'
,
# feature extraction
number_of_extraction_jobs
=
32
,
extraction_queue
=
'4G-io-big'
,
# feature projection
number_of_projection_jobs
=
32
,
projection_queue
=
{},
# model enrollment
number_of_enrollment_jobs
=
32
,
enrollment_queue
=
{},
# scoring
number_of_scoring_jobs
=
32
,
scoring_queue
=
'4G-io-big'
,
)
import
bob.bio.base.grid
import
Grid
grid
=
Grid
(
training_queue
=
'8G'
,
number_of_preprocessing_jobs
=
32
,
preprocessing_queue
=
'4G-io-big'
,
number_of_extraction_jobs
=
32
,
extraction_queue
=
'4G-io-big'
,
number_of_projection_jobs
=
32
,
projection_queue
=
{},
number_of_enrollment_jobs
=
32
,
enrollment_queue
=
{},
number_of_scoring_jobs
=
32
,
scoring_queue
=
'4G-io-big'
,
)
bob/bio/vein/configurations/grid/gpu3.py
View file @
d7432c9d
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import
facereclib
# setup of the grid parameters
# define a queue with demanding parameters
grid
=
facereclib
.
utils
.
GridParameters
(
training_queue
=
'8G'
,
# preprocessing
number_of_preprocessings_per_job
=
1000
,
preprocessing_queue
=
{},
# feature extraction
number_of_extracted_features_per_job
=
1000
,
extraction_queue
=
{},
# feature projection
number_of_projected_features_per_job
=
1000
,
projection_queue
=
{},
# model enrollment
number_of_enrolled_models_per_job
=
100
,
enrollment_queue
=
'2G'
,
# scoring
number_of_models_per_scoring_job
=
1500
,
scoring_queue
=
{
'queue'
:
'q_gpu'
},
)