Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.fusion.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.fusion.base
Commits
d9125673
Commit
d9125673
authored
6 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
Improve error messages
parent
71d3bd82
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/fusion/base/tools/common.py
+13
-3
13 additions, 3 deletions
bob/fusion/base/tools/common.py
with
13 additions
and
3 deletions
bob/fusion/base/tools/common.py
+
13
−
3
View file @
d9125673
...
...
@@ -28,9 +28,16 @@ def check_consistency(gen_l, zei_l, atk_l):
continue
score_lines0
=
score_lines_list
[
0
]
for
score_lines
in
score_lines_list
[
1
:]:
assert
(
np
.
all
(
score_lines
[
'
claimed_id
'
]
==
score_lines0
[
'
claimed_id
'
]))
assert
(
np
.
all
(
score_lines
[
'
real_id
'
]
==
score_lines0
[
'
real_id
'
]))
match
=
np
.
all
(
score_lines
[
'
claimed_id
'
]
==
score_lines0
[
'
claimed_id
'
])
if
not
match
:
raise
ValueError
(
"
claimed ids do not match between score files
"
)
match
=
np
.
all
(
score_lines
[
'
real_id
'
]
==
score_lines0
[
'
real_id
'
])
if
not
match
:
raise
ValueError
(
"
real ids do not match between score files
"
)
def
get_scores
(
*
args
):
...
...
@@ -89,6 +96,9 @@ def get_gza_from_lines_list(score_lines_list):
zei_lengths
=
np
.
array
(
zei_lengths
)
idx1
=
0
# used later if it does not enter the if.
if
not
(
np
.
all
(
zei_lengths
==
0
)
or
np
.
all
(
zei_lengths
>
0
)):
logger
.
info
(
"
Trying to fill-in the missing zero effort impostor scores
"
"
for pad systems. If you see a numpy index error below,
"
"
your biometric scores do not match your pad scores.
"
)
# generate the missing ones
# find one that has zei
idx1
=
zei_lengths
.
nonzero
()[
0
][
0
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment