Commit 710a8d1f authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

Fix error related to bob.measure->bob.bio.base movings

parent 90788ed5
Pipeline #19939 passed with stage
in 26 minutes and 45 seconds
......@@ -8,7 +8,6 @@
from __future__ import print_function
import bob.measure
import os
import shutil
......@@ -44,7 +43,7 @@ def _spoof(parameters, cur_test_dir, sub_dir, score_types=('dev-real',), scores_
for i in range(0, len(score_types)):
data2check = []
for sfile in (score_files[i], reference_files[i]):
f = bob.measure.load.open_file(sfile)
f = bob.bio.base.score.load.open_file(sfile)
d_ = []
for line in f:
if isinstance(line, bytes): line = line.decode('utf-8')
......
......@@ -7,7 +7,7 @@
from __future__ import print_function
import numpy
import bob.measure
import bob.bio.base
import os.path
import bob.core
......@@ -22,7 +22,7 @@ def load_noattacks_scores(filename):
male_pos = []
# read four column list line by line
for (client_id, probe_id, filename, score) in bob.measure.load.four_column(filename):
for (client_id, probe_id, filename, score) in bob.bio.base.score.load.four_column(filename):
if client_id == probe_id:
if 'female' in filename:
female_pos.append(score)
......@@ -47,7 +47,7 @@ def load_attack_scores(scores_filename, support="all", adevice="all", recdevice=
negatives = []
# read four column list line by line
for (client_id, probe_id, filename, score) in bob.measure.load.four_column(scores_filename):
for (client_id, probe_id, filename, score) in bob.bio.base.score.load.four_column(scores_filename):
if client_id == probe_id:
# if (support in filename or support == "all") and \
# (adevice in filename or adevice == "all") and \
......@@ -74,7 +74,7 @@ def scores_to_dict(filename, support="all", adevice="all", recdevice="all"):
negatives = {}
# read four column list line by line
for (client_id, probe_id, filename, score) in bob.measure.load.four_column(filename):
for (client_id, probe_id, filename, score) in bob.bio.base.score.load.four_column(filename):
if client_id == probe_id:
if (support in filename or support == "all") and \
(adevice in filename or adevice == "all") and \
......@@ -124,4 +124,4 @@ def accumulate_scores(pad_scores_dir, avs_scores_dir, support="all", attackdevic
logger.info("%s %s %s: %d",
system, group, score_types[2], len(all_scores[system][group][score_types[2]]))
logger.info("%s %s %s: %d", system, group, type, len(all_scores[system][group][type]))
return all_scores
\ No newline at end of file
return all_scores
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