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

Merge branch 'improve_mobio_4' into 'master'

Improve mobio 4

See merge request !16
parents dff99a25 d3be692b
No related branches found
No related tags found
No related merge requests found
{
"description": "The MOBIO Database of Faces",
"root_folder": "/idiap/resource/database/mobio/IMAGES_PNG",
"root_folder": "/idiap/resource/database/mobio",
"protocols": [
{
"name": "male",
......@@ -12,7 +12,8 @@
"view": "Train",
"parameters": {
"protocol": "male",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -28,7 +29,8 @@
"parameters": {
"protocol": "male",
"group": "dev",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -45,7 +47,8 @@
"parameters": {
"protocol": "male",
"group": "dev",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -63,7 +66,8 @@
"parameters": {
"protocol": "male",
"group": "eval",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -80,7 +84,8 @@
"parameters": {
"protocol": "male",
"group": "eval",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -103,7 +108,8 @@
"view": "Train",
"parameters": {
"protocol": "female",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -119,7 +125,8 @@
"parameters": {
"protocol": "female",
"group": "dev",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -136,7 +143,8 @@
"parameters": {
"protocol": "female",
"group": "dev",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -154,7 +162,8 @@
"parameters": {
"protocol": "female",
"group": "eval",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......@@ -171,7 +180,8 @@
"parameters": {
"protocol": "female",
"group": "eval",
"annotations": "../IMAGE_ANNOTATIONS"
"images": "IMAGES_PNG",
"annotations": "IMAGE_ANNOTATIONS"
},
"outputs": {
"file_id": "{{ system_user.username }}/uint64/1",
......
......@@ -69,6 +69,10 @@ class Train(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)
objs = sorted(db.objects(protocol=parameters['protocol'],
......@@ -76,7 +80,7 @@ class Train(View):
purposes='train'),
key=lambda x: (x.client_id, x.id))
return [ Entry(x.client_id, x.id, db.annotations(x), x.make_path(root_folder, '.png'))
return [ Entry(x.client_id, x.id, db.annotations(x), x.make_path(images, '.png'))
for x in objs ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment