diff --git a/advanced/databases/biowave/2.json b/advanced/databases/biowave/2.json new file mode 100644 index 0000000000000000000000000000000000000000..63a45864360d44e5f75bdfacf5b2b65b8e4f678f --- /dev/null +++ b/advanced/databases/biowave/2.json @@ -0,0 +1,1579 @@ +{ + "root_folder": "/idiap/project/biowave/biowave_v1/data", + "description": "BIOWAVE Vein Database", + "protocols": [ + { + "name": "Idiap_1_1_R_BEAT_test", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_5_5_R_BEAT_test", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_5_R_BEAT_test", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_1_5_R_BEAT_test", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_5_R_BEAT_test", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_5_R_BEAT_test", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_5_R_BEAT_test", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_5_R_BEAT_test", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_1_R", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_5_R", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_1_5_R", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_5_R", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_5_R", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_5_R", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_5_R", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_3_5_R", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_3_5_R", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_3_5_R", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_3_5_R", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_3_5_R", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_3_5_R", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_5_5_R", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_1_L", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_5_L", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_1_5_L", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_5_L", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_5_L", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_5_L", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_5_L", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_5_5_L", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_1_R_less", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_1_1_R_less", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_1_R_less", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_1_R_less", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_1_R_less", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_1_R_less", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_5_R_less", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_1_5_R_less", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_5_R_less", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_5_R_less", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_5_R_less", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_5_R_less", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_5_5_R_less", + "template": "advanced_vein_recognition_2", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "template": "train", + "parameters": { + "protocol": "Idiap_5_5_R_less", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_5_5_R_less", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_5_5_R_less", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateView", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_5_5_R_less", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "View", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_5_5_R_less", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_1_R_annotations_BEAT_test", + "template": "advanced_vein_annotations", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "template": "train", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_1_R_BEAT_test", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_2_1_R_annotations_BEAT_test", + "template": "advanced_vein_annotations", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "template": "train", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_5_5_R_BEAT_test", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_1_R_annotations", + "template": "advanced_vein_annotations", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "template": "train", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_1_R", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_2_1_R_annotations", + "template": "advanced_vein_annotations", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "template": "train", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_5_5_R", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_1_1_L_annotations", + "template": "advanced_vein_annotations", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "template": "train", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_1_1_L", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "Idiap_2_1_L_annotations", + "template": "advanced_vein_annotations", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "template": "train", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "world" + }, + "name": "train" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "dev_templates", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "dev", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "ViewAnnotations", + "name": "dev_probes", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "dev", + "purpose": "probe" + }, + "template": "probe" + }, + { + "outputs": { + "model_id": "{{ system_user.username }}/text/1", + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_templates", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "eval", + "purpose": "enroll" + }, + "template": "enroll" + }, + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1", + "client_id": "{{ system_user.username }}/uint64/1" + }, + "view": "TemplateViewAnnotations", + "name": "eval_probes", + "parameters": { + "protocol": "Idiap_5_5_L", + "group": "eval", + "purpose": "probe" + }, + "template": "probe" + } + ] + }, + { + "name": "annotation_benchmark", + "template": "advanced_annotation_benchmark", + "sets": [ + { + "outputs": { + "image": "{{ system_user.username }}/array_2d_uint8/1", + "vein_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "ROI_annotations": "{{ system_user.username }}/array_2d_uint8/1", + "alignment_annotations": "{{ system_user.username }}/array_1d_coordinates/1" + }, + "view": "AnnotationBenchmark", + "template": "annotation_benchmark", + "parameters": { + "protocol": "Idiap_1_1_R" + }, + "name": "annotations" + } + ] + } + ] +} diff --git a/advanced/databases/biowave/2.py b/advanced/databases/biowave/2.py new file mode 100644 index 0000000000000000000000000000000000000000..cad66fd4cf70e4266984b48f01d1b353fdb2e703 --- /dev/null +++ b/advanced/databases/biowave/2.py @@ -0,0 +1,745 @@ +############################################################################### +# # +# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/ # +# Contact: beat.support@idiap.ch # +# # +# This file is part of the beat.examples module of the BEAT platform. # +# # +# Commercial License Usage # +# Licensees holding valid commercial BEAT licenses may use this file in # +# accordance with the terms contained in a written agreement between you # +# and Idiap. For further information contact tto@idiap.ch # +# # +# Alternatively, this file may be used under the terms of the GNU Affero # +# Public License version 3 as published by the Free Software and appearing # +# in the file LICENSE.AGPL included in the packaging of this file. # +# The BEAT platform is distributed in the hope that it will be useful, but # +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # +# or FITNESS FOR A PARTICULAR PURPOSE. # +# # +# You should have received a copy of the GNU Affero Public License along # +# with the BEAT platform. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +import os +import numpy as np +import bob.io.base +import bob.io.image +import bob.db.biowave_v1 + + +#---------------------------------------------------------- + + +def get_client_end_index(objs, client_id, client_start_index, + start_index, end_index): + client_end_index = client_start_index + + while client_end_index + 1 <= end_index: + obj = objs[client_end_index + 1 - start_index] + + if isinstance(obj, tuple): + obj = obj[1] + + if obj.client_id != client_id: + return client_end_index + + client_end_index += 1 + + return end_index + + +#---------------------------------------------------------- + + +def get_model_end_index(objs, model_id, model_start_index, + start_index, end_index): + model_end_index = model_start_index + + while model_end_index + 1 <= end_index: + obj = objs[model_end_index + 1 - start_index] + + if obj.model_id != model_id: + return model_end_index + + model_end_index += 1 + + return end_index + + +#---------------------------------------------------------- + + +class View: + """Outputs: + - image: "{{ system_user.username }}/array_2d_uint8/1" + - client_id: "{{ system_user.username }}/uint64/1" + + Several "image" are associated with a given "client_id". + + --------------- --------------- --------------- --------------- --------------- --------------- + | image | | image | | image | | image | | image | | image | + --------------- --------------- --------------- --------------- --------------- --------------- + ----------------------------------------------- ----------------------------------------------- + | client_id | | client_id | + ----------------------------------------------- ----------------------------------------------- + """ + + def setup(self, root_folder, outputs, parameters, force_start_index=None, + force_end_index=None): + + # Initialisations + self.root_folder = root_folder + self.outputs = outputs + self.parameters = parameters + + # Open the database and load the objects to provide via the outputs + self.db = bob.db.biowave_v1.Database() + + self.objs = sorted(self.db.objects(protocol=self.parameters['protocol'], + groups=[self.parameters['group']], + purposes=self.parameters.get('purpose', None), + annotated_images=False, + imagedir=self.root_folder), + key=lambda x: (x.client_id, x.id)) + + # Determine the range of indices that must be provided + self.start_index = force_start_index if force_start_index is not None else 0 + self.end_index = force_end_index if force_end_index is not None else len(self.objs) - 1 + + self.objs = self.objs[self.start_index : self.end_index + 1] + + self.next_index = self.start_index + + return True + + + def done(self, last_data_index): + return last_data_index >= self.end_index + + + def next(self): + obj = self.objs[self.next_index - self.start_index] + + # Output: client_id (only provide data when the client_id change) + if self.outputs['client_id'].isConnected() and \ + self.outputs['client_id'].last_written_data_index < self.next_index: + + client_end_index = get_client_end_index(self.objs, obj.client_id, + self.next_index, + self.start_index, + self.end_index) + + self.outputs['client_id'].write( + { + 'value': np.uint64(obj.client_id) + }, + client_end_index + ) + + # Output: image (provide data at each iteration) + if self.outputs['image'].isConnected(): + self.outputs['image'].write( + { + 'value': obj.load(directory=self.root_folder) + }, + self.next_index + ) + + # Determine the next data index that must be provided + self.next_index = 1 + min([ x.last_written_data_index for x in self.outputs + if x.isConnected() ] + ) + + return True + + +#---------------------------------------------------------- + + +class TemplateView: + """Outputs: + - image: "{{ system_user.username }}/array_2d_uint8/1" + - client_id: "{{ system_user.username }}/uint64/1" + - model_id: "{{ system_user.username }}/text/1" + + Several "image" are associated with a given "model_id". + Several "model_id" are associated with a given "client_id". + + --------------- --------------- --------------- --------------- --------------- --------------- + | image | | image | | image | | image | | image | | image | + --------------- --------------- --------------- --------------- --------------- --------------- + ----------------------------------------------- ----------------------------------------------- + | model_id | | model_id | + ----------------------------------------------- ----------------------------------------------- + ----------------------------------------------------------------------------------------------- + | client_id | + ----------------------------------------------------------------------------------------------- + + Note: for this particular database, there is only one "image" + per "model_id". + """ + + def setup(self, root_folder, outputs, parameters, force_start_index=None, + force_end_index=None): + + # Initialisations + self.root_folder = root_folder + self.outputs = outputs + self.parameters = parameters + + # Open the database and load the objects to provide via the outputs + self.db = bob.db.biowave_v1.Database() + + self.objs = sorted(self.db.objects(protocol=self.parameters['protocol'], + purposes=self.parameters['purpose'], + groups=[self.parameters['group']], + annotated_images=False, + imagedir=self.root_folder), + key=lambda x: (x.client_id, x.model_id, x.id)) + + # Determine the range of indices that must be provided + self.start_index = force_start_index if force_start_index is not None else 0 + self.end_index = force_end_index if force_end_index is not None else len(self.objs) - 1 + + self.objs = self.objs[self.start_index : self.end_index + 1] + + self.next_index = self.start_index + + return True + + + def done(self, last_data_index): + return last_data_index >= self.end_index + + + def next(self): + obj = self.objs[self.next_index - self.start_index] + + # Output: model_id (only provide data when the model_id change) + if self.outputs['model_id'].isConnected() and \ + self.outputs['model_id'].last_written_data_index < self.next_index: + + model_end_index = get_model_end_index(self.objs, obj.model_id, + self.next_index, + self.start_index, + self.end_index) + + self.outputs['model_id'].write( + { + 'text': obj.model_id.encode('utf-8') + }, + model_end_index + ) + + # Output: client_id (only provide data when the client_id change) + if self.outputs['client_id'].isConnected() and \ + self.outputs['client_id'].last_written_data_index < self.next_index: + + # Please pay attention - we can use the object CLIENT ID as long as we + # don't use both hands data of the same client in the same protocol. + client_end_index = get_client_end_index(self.objs, obj.client_id, + self.next_index, + self.start_index, + self.end_index) + + self.outputs['client_id'].write( + { + 'value': np.uint64(obj.client_id) + }, + client_end_index + ) + + # Output: image (provide data at each iteration) + if self.outputs['image'].isConnected(): + self.outputs['image'].write( + { + 'value': obj.load(directory=self.root_folder) + }, + self.next_index + ) + + # Determine the next data index that must be provided + self.next_index = 1 + min([ x.last_written_data_index for x in self.outputs + if x.isConnected() ] + ) + + return True + + +#---------------------------------------------------------- + + +class ViewAnnotations: + """Outputs: + - image: "{{ system_user.username }}/array_2d_uint8/1" + - vein_annotations: "{{ system_user.username }}/array_2d_uint8/1" + - ROI_annotations: "{{ system_user.username }}/array_2d_uint8/1" + - alignment_annotations: "{{ system_user.username }}/array_1d_coordinates/1" + - client_id: "{{ system_user.username }}/uint64/1" + + One "vein_annotations" are associated with a given "image". + One "ROI_annotations" are associated with a given "image". + One "alignment_annotations" are associated with a given "image". + Several "image" are associated with a given "client_id". + + ------------------------- ------------------------- ------------------------- ------------------------- + | image | | image | | image | | image | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | vein_annotations | | vein_annotations | | vein_annotations | | vein_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | ROI_annotations | | ROI_annotations | | ROI_annotations | | ROI_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | alignment_annotations | | alignment_annotations | | alignment_annotations | | alignment_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + --------------------------------------------------- --------------------------------------------------- + | client_id | | client_id | + --------------------------------------------------- --------------------------------------------------- + """ + + def setup(self, root_folder, outputs, parameters, force_start_index=None, + force_end_index=None): + + # Initialisations + self.root_folder = root_folder + self.outputs = outputs + self.parameters = parameters + + # Open the database and load the objects to provide via the outputs + self.db = bob.db.biowave_v1.Database() + + self.objs = sorted(self.db.objects(protocol=self.parameters['protocol'], + groups=[self.parameters['group']], + purposes=self.parameters.get('purpose', None), + annotated_images=True, + imagedir=self.root_folder), + key=lambda x: (x.client_id, x.id)) + + # Determine the range of indices that must be provided + self.start_index = force_start_index if force_start_index is not None else 0 + self.end_index = force_end_index if force_end_index is not None else len(self.objs) - 1 + + self.objs = self.objs[self.start_index : self.end_index + 1] + + self.next_index = self.start_index + + return True + + + def done(self, last_data_index): + return last_data_index >= self.end_index + + + def next(self): + obj = self.objs[self.next_index - self.start_index] + + # Output: client_id (only provide data when the client_id change) + if self.outputs['client_id'].isConnected() and \ + self.outputs['client_id'].last_written_data_index < self.next_index: + + client_end_index = get_client_end_index(self.objs, obj.client_id, + self.next_index, + self.start_index, + self.end_index) + + self.outputs['client_id'].write( + { + 'value': np.uint64(obj.client_id) + }, + client_end_index + ) + + # Output: vein_annotations (provide data at each iteration) + if self.outputs['vein_annotations'].isConnected(): + self.outputs['vein_annotations'].write( + { + 'value': obj.construct_vein_image(directory=self.root_folder) + }, + self.next_index + ) + + # Output: ROI_annotations (provide data at each iteration) + if self.outputs['ROI_annotations'].isConnected(): + self.outputs['ROI_annotations'].write( + { + 'value': obj.construct_ROI_image(directory=self.root_folder) + }, + self.next_index + ) + + # Output: alignment_annotations (provide data at each iteration) + if self.outputs['alignment_annotations'].isConnected(): + alignment_annotations = obj.alignment_annotations(directory=self.root_folder) + + coordinate_list = [] + for annotation in alignment_annotations: + coordinate = { + "y": np.int32(annotation[0]), + "x": np.int32(annotation[1]) + } + coordinate_list.append(coordinate) + + self.outputs['alignment_annotations'].write( + { + 'value': coordinate_list + }, + self.next_index + ) + + # Output: image (provide data at each iteration) + if self.outputs['image'].isConnected(): + self.outputs['image'].write( + { + 'value': obj.load(directory=self.root_folder) + }, + self.next_index + ) + + # Determine the next data index that must be provided + self.next_index = 1 + min([ x.last_written_data_index for x in self.outputs + if x.isConnected() ] + ) + + return True + + +#---------------------------------------------------------- + + +class TemplateViewAnnotations: + """Outputs: + - image: "{{ system_user.username }}/array_2d_uint8/1" + - vein_annotations: "{{ system_user.username }}/array_2d_uint8/1" + - ROI_annotations: "{{ system_user.username }}/array_2d_uint8/1" + - alignment_annotations: "{{ system_user.username }}/array_1d_coordinates/1" + - model_id: "{{ system_user.username }}/model_id/1" + - client_id: "{{ system_user.username }}/uint64/1" + + One "vein_annotations" are associated with a given "image". + One "ROI_annotations" are associated with a given "image". + One "alignment_annotations" are associated with a given "image". + Several "image" are associated with a given "model_id". + Several "model_id" are associated with a given "client_id". + + ------------------------- ------------------------- ------------------------- ------------------------- + | image | | image | | image | | image | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | vein_annotations | | vein_annotations | | vein_annotations | | vein_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | ROI_annotations | | ROI_annotations | | ROI_annotations | | ROI_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | alignment_annotations | | alignment_annotations | | alignment_annotations | | alignment_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + --------------------------------------------------- --------------------------------------------------- + | model_id | | model_id | + --------------------------------------------------- --------------------------------------------------- + ------------------------------------------------------------------------------------------------------- + | client_id | + ------------------------------------------------------------------------------------------------------- + + Note: for this particular database, there is only one "image" + per "model_id". + """ + + def setup(self, root_folder, outputs, parameters, force_start_index=None, + force_end_index=None): + + # Initialisations + self.root_folder = root_folder + self.outputs = outputs + self.parameters = parameters + + # Open the database and load the objects to provide via the outputs + self.db = bob.db.biowave_v1.Database() + + self.objs = sorted(self.db.objects(protocol=self.parameters['protocol'], + purposes=self.parameters['purpose'], + groups=[self.parameters['group']], + annotated_images=True, + imagedir=self.root_folder), + key=lambda x: (x.client_id, x.model_id, x.id)) + + # Determine the range of indices that must be provided + self.start_index = force_start_index if force_start_index is not None else 0 + self.end_index = force_end_index if force_end_index is not None else len(self.objs) - 1 + + self.objs = self.objs[self.start_index : self.end_index + 1] + + self.next_index = self.start_index + + return True + + + def done(self, last_data_index): + return last_data_index >= self.end_index + + + def next(self): + obj = self.objs[self.next_index - self.start_index] + + # Output: model_id (only provide data when the model_id change) + if self.outputs['model_id'].isConnected() and \ + self.outputs['model_id'].last_written_data_index < self.next_index: + + model_end_index = get_model_end_index(self.objs, obj.model_id, + self.next_index, + self.start_index, + self.end_index) + + self.outputs['model_id'].write( + { + 'text': obj.model_id.encode('utf-8') + }, + model_end_index + ) + + # Output: client_id (only provide data when the client_id change) + if self.outputs['client_id'].isConnected() and \ + self.outputs['client_id'].last_written_data_index < self.next_index: + + # Please pay attention - we can use the object CLIENT ID as long as we + # don't use both hands data of the same client in the same protocol. + client_end_index = get_client_end_index(self.objs, obj.client_id, + self.next_index, + self.start_index, + self.end_index) + + self.outputs['client_id'].write( + { + 'value': np.uint64(obj.client_id) + }, + client_end_index + ) + + # Output: vein_annotations (provide data at each iteration) + if self.outputs['vein_annotations'].isConnected(): + self.outputs['vein_annotations'].write( + { + 'value': obj.construct_vein_image(directory=self.root_folder) + }, + self.next_index + ) + + # Output: ROI_annotations (provide data at each iteration) + if self.outputs['ROI_annotations'].isConnected(): + self.outputs['ROI_annotations'].write( + { + 'value': obj.construct_ROI_image(directory=self.root_folder) + }, + self.next_index + ) + + # Output: alignment_annotations (provide data at each iteration) + if self.outputs['alignment_annotations'].isConnected(): + alignment_annotations = obj.alignment_annotations(directory=self.root_folder) + + coordinate_list = [] + for annotation in alignment_annotations: + coordinate = { + "y": np.int32(annotation[0]), + "x": np.int32(annotation[1]) + } + coordinate_list.append(coordinate) + + self.outputs['alignment_annotations'].write( + { + 'value': coordinate_list + }, + self.next_index + ) + + # Output: image (provide data at each iteration) + if self.outputs['image'].isConnected(): + self.outputs['image'].write( + { + 'value': obj.load(directory=self.root_folder) + }, + self.next_index + ) + + # Determine the next data index that must be provided + self.next_index = 1 + min([ x.last_written_data_index for x in self.outputs + if x.isConnected() ] + ) + + return True + + +#---------------------------------------------------------- + + +class AnnotationBenchmark: + """Outputs: + - image: "{{ system_user.username }}/array_2d_uint8/1" + - vein_annotations: "{{ system_user.username }}/array_2d_uint8/1" + - ROI_annotations: "{{ system_user.username }}/array_2d_uint8/1" + - alignment_annotations: "{{ system_user.username }}/array_1d_coordinates/1" + + One "vein_annotations" are associated with a given "image". + One "ROI_annotations" are associated with a given "image". + One "alignment_annotations" are associated with a given "image". + + ------------------------- ------------------------- ------------------------- ------------------------- + | image | | image | | image | | image | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | vein_annotations | | vein_annotations | | vein_annotations | | vein_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | ROI_annotations | | ROI_annotations | | ROI_annotations | | ROI_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + ------------------------- ------------------------- ------------------------- ------------------------- + | alignment_annotations | | alignment_annotations | | alignment_annotations | | alignment_annotations | + ------------------------- ------------------------- ------------------------- ------------------------- + """ + + def setup(self, root_folder, outputs, parameters, force_start_index=None, + force_end_index=None): + + # Initialisations + self.root_folder = root_folder + self.outputs = outputs + self.parameters = parameters + + # Open the database and load the objects to provide via the outputs + self.db = bob.db.biowave_v1.Database() + + self.objs = sorted(self.db.objects(protocol=self.parameters['protocol'], + annotated_images=True, + imagedir=self.root_folder), + key=lambda x: x.id) + + # Determine the range of indices that must be provided + self.start_index = force_start_index if force_start_index is not None else 0 + self.end_index = force_end_index if force_end_index is not None else len(self.objs) - 1 + + self.objs = self.objs[self.start_index : self.end_index + 1] + + self.next_index = self.start_index + + return True + + + def done(self, last_data_index): + return last_data_index >= self.end_index + + + def next(self): + obj = self.objs[self.next_index - self.start_index] + + # Output: vein_annotations (provide data at each iteration) + if self.outputs['vein_annotations'].isConnected(): + self.outputs['vein_annotations'].write( + { + 'value': obj.construct_vein_image(directory=self.root_folder) + }, + self.next_index + ) + + # Output: ROI_annotations (provide data at each iteration) + if self.outputs['ROI_annotations'].isConnected(): + self.outputs['ROI_annotations'].write( + { + 'value': obj.construct_ROI_image(directory=self.root_folder) + }, + self.next_index + ) + + # Output: alignment_annotations (provide data at each iteration) + if self.outputs['alignment_annotations'].isConnected(): + alignment_annotations = obj.alignment_annotations(directory=self.root_folder) + + coordinate_list = [] + for annotation in alignment_annotations: + coordinate = { + "y": np.int32(annotation[0]), + "x": np.int32(annotation[1]) + } + coordinate_list.append(coordinate) + + self.outputs['alignment_annotations'].write( + { + 'value': coordinate_list + }, + self.next_index + ) + + # Output: image (provide data at each iteration) + if self.outputs['image'].isConnected(): + self.outputs['image'].write( + { + 'value': obj.load(directory=self.root_folder) + }, + self.next_index + ) + + # Determine the next data index that must be provided + self.next_index = 1 + min([ x.last_written_data_index for x in self.outputs + if x.isConnected() ] + ) + + return True + + +#---------------------------------------------------------- + + +def setup_tests(): + # Install a mock methods + def mock_load(obj, directory=''): + return np.ndarray((10, 20), dtype=np.uint8) + + def mock_construct_vein_image(obj, directory=''): + return np.ndarray((10, 20), dtype=np.uint8) + + def mock_construct_ROI_image(obj, directory=''): + return np.ndarray((10, 20), dtype=np.uint8) + + bob.db.biowave_v1.models.File.load = mock_load + bob.db.biowave_v1.models.File.construct_vein_image = mock_construct_vein_image + bob.db.biowave_v1.models.File.construct_ROI_image = mock_construct_ROI_image + + +#---------------------------------------------------------- + + +# Test the behavior of the views (on fake data) +if __name__ == '__main__': + + setup_tests() + + from beat.backend.python.database import DatabaseTester + + DatabaseTester('View', View, + [ + 'client_id', + 'image', + ], + parameters=dict( + protocol="Idiap_1_1_R_BEAT_test", + group="world", + ), + ) + + DatabaseTester('TemplateView', TemplateView, + [ + 'client_id', + 'model_id', + 'image', + ], + parameters=dict( + protocol="Idiap_1_1_R_BEAT_test", + group="dev", + purpose="enroll", + ), + irregular_outputs=[ + 'model_id', + ] + ) diff --git a/advanced/databases/biowave/2.rst b/advanced/databases/biowave/2.rst new file mode 100644 index 0000000000000000000000000000000000000000..aa9df6a3d5a3159f35bfa1252a40d7c462cc9bd4 --- /dev/null +++ b/advanced/databases/biowave/2.rst @@ -0,0 +1,208 @@ +.. Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/ .. +.. Contact: beat.support@idiap.ch .. +.. .. +.. This file is part of the beat.examples module of the BEAT platform. .. +.. .. +.. Commercial License Usage .. +.. Licensees holding valid commercial BEAT licenses may use this file in .. +.. accordance with the terms contained in a written agreement between you .. +.. and Idiap. For further information contact tto@idiap.ch .. +.. .. +.. Alternatively, this file may be used under the terms of the GNU Affero .. +.. Public License version 3 as published by the Free Software and appearing .. +.. in the file LICENSE.AGPL included in the packaging of this file. .. +.. The BEAT platform is distributed in the hope that it will be useful, but .. +.. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY .. +.. or FITNESS FOR A PARTICULAR PURPOSE. .. +.. .. +.. You should have received a copy of the GNU Affero Public License along .. +.. with the BEAT platform. If not, see http://www.gnu.org/licenses/. .. + +BIOWAVE Vein Database +--------------------- + +Changelog +========= + +* **Version 2**, 17/Nov/2017: + + - Add protocol 'Idiap_3_5_R' + +* **Version 1**, 30/Oct/2017: + + - Initial release + + +Description +=========== + + +The ``BIOWAVE`` database contains wrist vein images that are acquired using +BIOWATCH biometric sensor. For each subject of the database there are 3 session +images (sessions were held at least 24 hours apart). Each session consists of 5 +attempts, in each attempt 5 images were acquired, meaning, that there are +``3 sessions x 5 attempts x 5 images = 75`` images per each person's hand, +``75 x 2 images`` per person. + +Images were previously manually evaluated, and if any of the 75 one hand's +images were unusable (too blurred, veins couldn't be seen, etc), than all hand +data were discarded. That is way some persons has only 1 hand's images in the +database. + +Statistics of the data - in total 111 hands: + +1) Users with both hands images - 53 +2) Users with only R hand images - 4 +3) Users with only L hand images - 1 + + + +Data division in ``groups`` and ``purposes`` +############################################ + + +In the BIOWAVE database there are following groups and purposes: + + ++-------------+-----------+-----------------------+------------------------+ +| **groups** | ``world`` | ``dev`` | ``eval`` | ++-------------+-----------+-----------------------+------------------------+ +|**purposes** | ``train`` |``enroll`` / ``probe`` | ``enroll`` / ``probe`` | ++-------------+-----------+-----------------------+------------------------+ + + +Data are divided into training, development and evolution data sets: + +1) ``dev`` data set -- ``20`` persons with both hand images; +2) ``eval`` data set -- ``20`` persons with both hand images; +3) ``world`` data set -- the rest of ``13`` persons with both hand images + ``4`` persons with only ``right`` hand and the ``1`` person with only ``left`` hand images. + +Data are divided as follows (the number means original persons ``ID`` (as in +data collection)): + +1) ``dev`` data - [1, 3, 5, 6, 12, 15, 22, 23, 25, 45, 69, 71, 74, 76, 77, 78, 84, 129, 132, 134] +2) ``eval`` data - [4, 7, 21, 42, 43, 48, 54, 57, 58, 72, 73, 75, 83, 90, 99, 130, 131, 138, 141, 143] +3) ``world`` data - [13, 14, 17, 20, 24, 28, 31, 39, 51, 60, 68, 128, 133] + [37] + [2, 11, 46, 70] + +In the ``enroll`` data sets are images only from session ``1`` whereas in +``probe`` data sets -- session's ``2`` and ``3`` data. + + +Protocols +######### + +There currently are 6 *standard* protocols: + +- ``Idiap_1_1_R`` +- ``Idiap_1_5_R`` +- ``Idiap_5_5_R`` +- ``Idiap_1_1_L`` +- ``Idiap_1_5_L`` +- ``Idiap_5_5_L`` + +The general form:: + + Idiap_<a>_<b>_<c> + +* a -- number of attempts used to construct model; +* b -- number of attempt images used to construct model; +* c -- hand (``L`` or ``R``). Always all images are used, the opposite hand's images are mirrored. + +E.g. in protocol ``Idiap_5_5_R`` per one hand only one enroll model is +constructed using all session ``1`` images (``5 attempt x 5 images``). In this +protocol ``right`` hands are included unchanged, but ``left`` hands are +mirrored. + +After data alignment were annotated, that included common point finding between +each person images, we noted that some of the person data were almost impossible +to annotate. Hands were: + +- Person_002/Right +- Person_005/Left +- Person_015/Right +- Person_046/Right +- Person_068/Right +- Person_068/Left +- Person_129/Right +- Person_138/Left + +For protocols: + +- ``Idiap_1_1_R_less`` +- ``Idiap_1_5_R_less`` +- ``Idiap_5_5_R_less`` + +also listed hand data were removed. + + +Protocol ``Idiap_3_5_R`` is not *standard* - in this protocol enroll model is +constructed using all 3 session 1st attempt images (thus each model consists of +``3x5=15`` images). This protocol is made to understand the enroll image +variabilities impact on the recognition rate. + +Finally, the protocols: + +- ``Idiap_1_1_R_BEAT_test`` +- ``Idiap_1_5_R_BEAT_test`` +- ``Idiap_5_5_R_BEAT_test`` + +are made as test protocols mainly for the BEAT platform. Again, the numbers in +the name indicates number of images per attempt and attempt count per each +enroll model. Each of the protocol groups consists of only 2 person data: + +- train -- [128, 133], +- dev -- [132, 134], +- eval -- [141, 143]. + +All these protocols uses the ``advanced_vein_recognition_2`` template. + +Annotations +########### + + +8% of database files have annotations (2 images per session, 6 images per hand, +altogether 666 images). There are: + +- vein pattern binary annotations; +- ROI binary annotations; +- alignment point annotations (for each hand 3-5 points marked). + + +Annotations to replace extractors +################################# + + +Special protocols that consists only the files that have annotations are made. +Meaning, these protocols can be used to run !!!!! TBD + + + + + +The organisation of the database is the same as before, only now, because there +are only 2 annotated images per session, protocols are renamed accordingly (also +note, that now protocols ``Idiap_1_5_R`` and ``Idiap_1_5_L`` doesn't make any +sense and are removed, because there are only 1 image per attempt that is +annotated): + +- ``Idiap_1_1_R`` -> renamed as ``Idiap_1_1_R_annotations``; +- ``Idiap_5_5_R`` -> renamed as ``Idiap_2_1_R_annotations``; +- ``Idiap_1_1_L`` -> renamed as ``Idiap_1_1_L_annotations``; +- ``Idiap_5_5_L`` -> renamed as ``Idiap_2_1_L_annotations``; + + +Also, the same as ``Idiap_<a>_<b>_<c>_BEAT_test`` protocols were created to +speedy test BEAT implementation and compare results with ``bob.bio.vein``, also +test protocols for annotations are implemented: + +- ``Idiap_1_1_R_annotations_BEAT_test``; +- ``Idiap_2_1_R_annotations_BEAT_test``; +- ``Idiap_1_1_L_annotations_BEAT_test``; +- ``Idiap_2_1_L_annotations_BEAT_test``; + +These protocols uses the ``advanced_vein_annotations`` template. + +Also, to benchmark different algorithms against **all** image annotations, there +are implemented protocol ``annotations_benchmark`` that is implemented using +``advanced_annotation_benchmark`` template. +