diff --git a/advanced/databases/mobio/4.py b/advanced/databases/mobio/4.py index f2c94b10b08e7778506205b684541300028bd473..1cbb8faadfdddc2c1ede005feb439bf8cbc5232d 100644 --- a/advanced/databases/mobio/4.py +++ b/advanced/databases/mobio/4.py @@ -159,6 +159,10 @@ class Templates(View): if not os.path.isabs(annotations): annotations = os.path.join(root_folder, annotations) + images = parameters['images'] + if not os.path.isabs(images): + images = os.path.join(root_folder, images) + db = bob.db.mobio.Database(annotation_directory=annotations) template_ids = db.model_ids(protocol=parameters['protocol'], @@ -173,7 +177,7 @@ class Templates(View): model_ids=[template_id]) entries.extend([ Entry(x.client_id, template_id, x.id, db.annotations(x), - x.make_path(root_folder, '.png')) + x.make_path(images, '.png')) for x in objs ]) return sorted(entries, key=lambda x: (x.client_id, x.template_id, x.file_id)) @@ -262,6 +266,10 @@ class Probes(View): if not os.path.isabs(annotations): annotations = os.path.join(root_folder, annotations) + images = parameters['images'] + if not os.path.isabs(images): + images = os.path.join(root_folder, images) + db = bob.db.mobio.Database(annotation_directory=annotations) template_ids = sorted(db.model_ids(protocol=parameters['protocol'], @@ -290,7 +298,7 @@ class Probes(View): if obj.id in template_probes[template_id] ] entries.append( Entry(templates, obj.client_id, obj.id, obj.id, - db.annotations(obj), obj.make_path(root_folder, '.png')) ) + db.annotations(obj), obj.make_path(images, '.png')) ) return sorted(entries, key=lambda x: (len(x.template_ids), x.template_ids, x.client_id, x.probe_id))