Skip to content
Snippets Groups Projects
Commit a7b2f7f1 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Catch-up with changes to verafinger

parent 470b12f3
Branches
Tags v2.0.3
No related merge requests found
Pipeline #
......@@ -36,10 +36,8 @@ class File(BioFile):
basedir = args[0] if args else kwargs['directory']
annotdir = os.path.join(basedir, 'annotations', 'roi')
if os.path.exists(annotdir):
print('loading annotations')
roi = self.__f.roi(args[0])
return AnnotatedArray(image, metadata=dict(roi=roi))
print('NOT loading annotations')
return image
......@@ -72,6 +70,8 @@ class Database(BioDatabase):
groups = self.convert_names_to_lowlevel(groups,
self.low_level_group_names, self.high_level_group_names)
if protocol.endswith('-va') or protocol.endswith('-VA'):
protocol = protocol[:-3]
return self._db.model_ids(groups=groups, protocol=protocol)
......@@ -81,15 +81,12 @@ class Database(BioDatabase):
groups = self.convert_names_to_lowlevel(groups,
self.low_level_group_names, self.high_level_group_names)
if (protocol.endswith('-va') or protocol.endswith('-VA')) and \
purposes=='probe': #the user actually means 'attack'
retval = self._db.objects(groups=groups, protocol=protocol[:-3],
purposes='attack', model_ids=model_ids,
**kwargs)
else:
retval = self._db.objects(groups=groups, protocol=protocol,
purposes=purposes, model_ids=model_ids,
**kwargs)
if protocol.endswith('-va') or protocol.endswith('-VA'):
protocol = protocol[:-3]
if purposes=='probe': purposes='attack'
retval = self._db.objects(groups=groups, protocol=protocol,
purposes=purposes, model_ids=model_ids, **kwargs)
return [File(f) for f in retval]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment