Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.face
Commits
e3711a79
Commit
e3711a79
authored
Mar 29, 2020
by
Tiago de Freitas Pereira
Browse files
Implemented score with multiple models for bob.bio.face.GaborJets
parent
a30d0f6e
Pipeline
#38476
failed with stage
in 7 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/face/algorithm/GaborJet.py
View file @
e3711a79
...
...
@@ -261,6 +261,20 @@ class GaborJet (Algorithm):
local_scores
=
[
jet_scoring
([
self
.
similarity_function
(
m
,
probe
[
n
])
for
m
in
model
[
n
]
for
probe
in
probes
])
for
n
in
range
(
len
(
model
))]
return
graph_scoring
(
local_scores
)
def
score_for_multiple_models
(
self
,
models
,
probe
):
self
.
_check_feature
(
probe
)
[
self
.
_check_feature
(
m
)
for
model
in
models
for
m
in
model
]
jet_scoring
=
numpy
.
average
if
self
.
jet_scoring
is
None
else
self
.
jet_scoring
graph_scoring
=
numpy
.
average
if
self
.
graph_scoring
is
None
else
self
.
graph_scoring
scores
=
[]
for
model
in
models
:
local_scores
=
local_scores
=
[
jet_scoring
([
self
.
similarity_function
(
m
,
pro
)
for
m
in
mod
])
for
mod
,
pro
in
zip
(
model
,
probe
)]
scores
.
append
(
graph_scoring
(
local_scores
))
return
scores
# overwrite functions to avoid them being documented.
def
train_projector
(
*
args
,
**
kwargs
)
:
raise
NotImplementedError
(
"This function is not implemented and should not be called."
)
...
...
@@ -270,4 +284,3 @@ class GaborJet (Algorithm):
def
read_feature
(
*
args
,
**
kwargs
)
:
raise
NotImplementedError
(
"This function is not implemented and should not be called."
)
def
train_enroller
(
*
args
,
**
kwargs
)
:
raise
NotImplementedError
(
"This function is not implemented and should not be called."
)
def
load_enroller
(
*
args
,
**
kwargs
)
:
pass
def
score_for_multiple_models
(
*
args
,
**
kwargs
)
:
raise
NotImplementedError
(
"This function is not implemented and should not be called."
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment