Commit 88c787e3 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Changed the namespace

parent 8a1706ca
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
# Thu Oct 09 11:27:27 CEST 2014
#
# Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program 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. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""A few checks on the protocols of a subset of the CUHK database
"""
import bob.db.cuhk
#possible_protocols = ["cuhk"]
""" Defining protocols. Yes, they are static """
PROTOCOLS = ('cuhk_p2s', 'arface_p2s', 'xm2vts_p2s', 'all-mixed_p2s', 'cuhk-arface-xm2vts_p2s', 'cuhk-xm2vts-arface_p2s',
'arface-cuhk-xm2vts_p2s', 'arface-xm2vts-cuhk_p2s', 'xm2vts-cuhk-arface_p2s', 'xm2vts-arface-cuhk_p2s',
'cuhk_s2p', 'arface_s2p', 'xm2vts_s2p', 'all-mixed_s2p', 'cuhk-arface-xm2vts_s2p', 'cuhk-xm2vts-arface_s2p',
'arface-cuhk-xm2vts_s2p', 'arface-xm2vts-cuhk_s2p', 'xm2vts-cuhk-arface_s2p', 'xm2vts-arface-cuhk_s2p')
GROUPS = ('world', 'dev', 'eval')
PURPOSES = ('train', 'enroll', 'probe')
def test01_protocols_purposes_groups():
#testing protocols
possible_protocols = bob.db.cuhk.Database().protocols()
for p in possible_protocols:
assert p in PROTOCOLS
#testing purposes
possible_purposes = bob.db.cuhk.Database().purposes()
for p in possible_purposes:
assert p in PURPOSES
#testing GROUPS
possible_groups = bob.db.cuhk.Database().groups()
for p in possible_groups:
assert p in GROUPS
def test02_all_files_protocols():
cuhk = 376
arface = 246
xm2vts = 590
all_mixed = 1212
cuhk_arface_xm2vts = 408
cuhk_xm2vts_arface = 404
arface_cuhk_xm2vts = 378
arface_xm2vts_cuhk = 378
xm2vts_cuhk_arface = 426
xm2vts_arface_cuhk = 430
assert len(bob.db.cuhk.Database().objects(protocol="cuhk_p2s")) == cuhk
assert len(bob.db.cuhk.Database().objects(protocol="cuhk_s2p")) == cuhk
assert len(bob.db.cuhk.Database().objects(protocol="arface_p2s")) == arface
assert len(bob.db.cuhk.Database().objects(protocol="arface_s2p")) == arface
assert len(bob.db.cuhk.Database().objects(protocol="xm2vts_p2s")) == xm2vts
assert len(bob.db.cuhk.Database().objects(protocol="xm2vts_s2p")) == xm2vts
assert len(bob.db.cuhk.Database().objects(protocol="all-mixed_p2s")) == all_mixed
assert len(bob.db.cuhk.Database().objects(protocol="all-mixed_s2p")) == all_mixed
assert len(bob.db.cuhk.Database().objects(protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface
assert len(bob.db.cuhk.Database().objects(protocol="xm2vts-cuhk-arface_s2p")) == xm2vts_cuhk_arface
def test03_world_files_protocols():
cuhk = 150
arface = 88
xm2vts = 236
all_mixed = 474
cuhk_arface_xm2vts = cuhk
cuhk_xm2vts_arface = cuhk
arface_cuhk_xm2vts = arface
arface_xm2vts_cuhk = arface
xm2vts_cuhk_arface = xm2vts
xm2vts_arface_cuhk = xm2vts
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="cuhk_p2s")) == cuhk
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="cuhk_s2p")) == cuhk
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="arface_p2s")) == arface
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="arface_s2p")) == arface
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="xm2vts_p2s")) == xm2vts
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="xm2vts_s2p")) == xm2vts
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="all-mixed_p2s")) == all_mixed
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="all-mixed_s2p")) == all_mixed
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface
assert len(bob.db.cuhk.Database().objects(groups='world', protocol="xm2vts-cuhk-arface_s2p")) == xm2vts_cuhk_arface
def test04_dev_files_protocols():
cuhk = 112
arface = 80
xm2vts = 176
all_mixed = 368
cuhk_arface_xm2vts = arface
cuhk_xm2vts_arface = xm2vts
arface_cuhk_xm2vts = cuhk
arface_xm2vts_cuhk = xm2vts
xm2vts_cuhk_arface = cuhk
xm2vts_arface_cuhk = arface
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="cuhk_p2s")) == cuhk
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="cuhk_s2p")) == cuhk
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="arface_p2s")) == arface
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="arface_s2p")) == arface
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="xm2vts_p2s")) == xm2vts
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="xm2vts_s2p")) == xm2vts
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="all-mixed_p2s")) == all_mixed
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="all-mixed_s2p")) == all_mixed
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface
assert len(bob.db.cuhk.Database().objects(groups='dev', protocol="xm2vts-cuhk-arface_s2p")) == xm2vts_cuhk_arface
def test05_eval_files_protocols():
cuhk = 114
arface = 78
xm2vts = 178
all_mixed = 370
cuhk_arface_xm2vts = xm2vts
cuhk_xm2vts_arface = arface
arface_cuhk_xm2vts = xm2vts
arface_xm2vts_cuhk = cuhk
xm2vts_cuhk_arface = arface
xm2vts_arface_cuhk = cuhk
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="cuhk_p2s")) == cuhk
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="cuhk_s2p")) == cuhk
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="arface_p2s")) == arface
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="arface_s2p")) == arface
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="xm2vts_p2s")) == xm2vts
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="xm2vts_s2p")) == xm2vts
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="all-mixed_p2s")) == all_mixed
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="all-mixed_s2p")) == all_mixed
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface
assert len(bob.db.cuhk.Database().objects(groups='eval', protocol="xm2vts-cuhk-arface_s2p")) == xm2vts_cuhk_arface
def test06_dev_enrol_files_protocols():
cuhk = 56
arface = 40
xm2vts = 88
all_mixed = 184
cuhk_arface_xm2vts = arface
cuhk_xm2vts_arface = xm2vts
arface_cuhk_xm2vts = cuhk
arface_xm2vts_cuhk = xm2vts
xm2vts_cuhk_arface = cuhk
xm2vts_arface_cuhk = arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="cuhk_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk_p2s"))== cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="cuhk_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk_s2p")) == cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="arface_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface_p2s")) == arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="arface_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface_s2p")) == arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="xm2vts_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="xm2vts_p2s")) == xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="xm2vts_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="xm2vts_s2p")) == xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="all-mixed_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="all-mixed_p2s")) == all_mixed
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="all-mixed_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="all-mixed_s2p")) == all_mixed
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="cuhk-arface-xm2vts_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="cuhk-arface-xm2vts_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="cuhk-xm2vts-arface_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="cuhk-xm2vts-arface_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="arface-xm2vts-cuhk_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="arface-xm2vts-cuhk_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="arface-cuhk-xm2vts_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="arface-cuhk-xm2vts_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="xm2vts-cuhk-arface_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='dev', protocol="xm2vts-cuhk-arface_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="xm2vts-cuhk-arface_s2p")) == xm2vts_cuhk_arface
def test07_eval_enrol_files_protocols():
cuhk = 57
arface = 39
xm2vts = 89
all_mixed = 185
cuhk_arface_xm2vts = xm2vts
cuhk_xm2vts_arface = arface
arface_cuhk_xm2vts = xm2vts
arface_xm2vts_cuhk = cuhk
xm2vts_cuhk_arface = arface
xm2vts_arface_cuhk = cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="cuhk_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk_p2s", groups='eval'))== cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="cuhk_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk_s2p", groups='eval')) == cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="arface_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface_p2s", groups='eval')) == arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="arface_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface_s2p", groups='eval')) == arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="xm2vts_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="xm2vts_p2s", groups='eval')) == xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="xm2vts_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="xm2vts_s2p", groups='eval')) == xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="all-mixed_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="all-mixed_p2s", groups='eval')) == all_mixed
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="all-mixed_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="all-mixed_s2p", groups='eval')) == all_mixed
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="cuhk-arface-xm2vts_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk-arface-xm2vts_p2s", groups='eval')) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="cuhk-arface-xm2vts_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk-arface-xm2vts_s2p", groups='eval')) == cuhk_arface_xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="cuhk-xm2vts-arface_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk-xm2vts-arface_p2s", groups='eval')) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="cuhk-xm2vts-arface_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="cuhk-xm2vts-arface_s2p", groups='eval')) == cuhk_xm2vts_arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="arface-xm2vts-cuhk_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface-xm2vts-cuhk_p2s", groups='eval')) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="arface-xm2vts-cuhk_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface-xm2vts-cuhk_s2p", groups='eval')) == arface_xm2vts_cuhk
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="arface-cuhk-xm2vts_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface-cuhk-xm2vts_p2s", groups='eval')) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="arface-cuhk-xm2vts_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="arface-cuhk-xm2vts_s2p", groups='eval')) == arface_cuhk_xm2vts
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="xm2vts-cuhk-arface_p2s")) == len(bob.db.cuhk.Database().enroll_files(protocol="xm2vts-cuhk-arface_p2s", groups='eval')) == xm2vts_cuhk_arface
assert len(bob.db.cuhk.Database().objects(purposes='enroll', groups='eval', protocol="xm2vts-cuhk-arface_s2p")) == len(bob.db.cuhk.Database().enroll_files(protocol="xm2vts-cuhk-arface_s2p", groups='eval')) == xm2vts_cuhk_arface
def test08_strings():
db = bob.db.cuhk.Database()
for p in PROTOCOLS:
for g in GROUPS:
for u in PURPOSES:
files = db.objects(purposes=u, groups=g, protocol=p)
for f in files:
#Checking if the strings are correct
assert f.purpose == u
assert f.protocol == p
assert f.group == g
def test09_annotations():
db = bob.db.cuhk.Database()
for p in PROTOCOLS:
for f in db.objects(protocol=p):
assert len(f.annotations(annotation_type=""))==35 #ALL ANNOTATIONS
assert f.annotations()["reye"][0] > 0
assert f.annotations()["reye"][1] > 0
assert f.annotations()["leye"][0] > 0
assert f.annotations()["leye"][1] > 0
......@@ -21,7 +21,7 @@
"""
from .query import Database
from bob.db.cuhk.models import File, Client, Annotation, Protocol_File_Association
from bob.db.cuhk_cufs.models import File, Client, Annotation, Protocol_File_Association
def get_config():
"""Returns a string containing the configuration information.
......
......@@ -422,7 +422,7 @@ def insert_protocol_data(session, protocol, group, purpose, file_objects, photo2
purpose = "enroll"
session.add(bob.db.cuhk.Protocol_File_Association(
session.add(bob.db.cuhk_cufs.Protocol_File_Association(
protocol, group, purpose, f.id))
......
CUHK-student-dataset/sketch/f-039-01-sz1 f-039-01
CUHK-student-dataset/sketch/f-040-01-sz1 f-040-01
CUHK-student-dataset/sketch/f-041-01-sz1 f-041-01
CUHK-student-dataset/sketch/f-042-01-sz1 f-042-01
CUHK-student-dataset/sketch/f-043-01-sz1 f-043-01
CUHK-student-dataset/sketch/f1-001-01-sz1 f1-001-01
CUHK-student-dataset/sketch/f1-002-01-sz1 f1-002-01
CUHK-student-dataset/sketch/f1-003-01-sz1 f1-003-01
CUHK-student-dataset/sketch/f1-004-01-sz1 f1-004-01
CUHK-student-dataset/sketch/f1-005-01-sz1 f1-005-01
CUHK-student-dataset/sketch/f1-006-01-sz1 f1-006-01
CUHK-student-dataset/sketch/f1-007-01-sz1 f1-007-01
CUHK-student-dataset/sketch/f1-008-01-sz1 f1-008-01
CUHK-student-dataset/sketch/f1-009-01-sz1 f1-009-01
CUHK-student-dataset/sketch/f1-010-01-sz1 f1-010-01
CUHK-student-dataset/sketch/f1-011-01-sz1 f1-011-01
CUHK-student-dataset/sketch/f1-012-01-sz1 f1-012-01
CUHK-student-dataset/sketch/f1-013-01-sz1 f1-013-01
CUHK-student-dataset/sketch/f1-014-01-sz1 f1-014-01
CUHK-student-dataset/sketch/f1-015-01-sz1 f1-015-01
CUHK-student-dataset/sketch/f2-005-01-sz1 f2-005-01
CUHK-student-dataset/sketch/f2-006-01-sz1 f2-006-01
CUHK-student-dataset/sketch/f2-007-01-sz1 f2-007-01
CUHK-student-dataset/sketch/f2-008-01-sz1 f2-008-01
CUHK-student-dataset/sketch/f2-009-01-sz1 f2-009-01
CUHK-student-dataset/sketch/f2-010-01-sz1 f2-010-01
CUHK-student-dataset/sketch/f2-011-01-sz1 f2-011-01
CUHK-student-dataset/sketch/f2-012-01-sz1 f2-012-01
CUHK-student-dataset/sketch/f2-013-01-sz1 f2-013-01
CUHK-student-dataset/sketch/f2-014-01-sz1 f2-014-01
CUHK-student-dataset/sketch/f2-015-01-sz1 f2-015-01
CUHK-student-dataset/sketch/f2-016-01-sz1 f2-016-01
CUHK-student-dataset/sketch/f2-017-01-sz1 f2-017-01
CUHK-student-dataset/sketch/f2-018-01-sz1 f2-018-01
CUHK-student-dataset/sketch/f2-019-01-sz1 f2-019-01
CUHK-student-dataset/sketch/f2-020-01-sz1 f2-020-01
CUHK-student-dataset/sketch/f2-021-01-sz1 f2-021-01
CUHK-student-dataset/sketch/f2-022-01-sz1 f2-022-01
CUHK-student-dataset/sketch/f2-023-01-sz1 f2-023-01
CUHK-student-dataset/sketch/f2-024-01-sz1 f2-024-01
CUHK-student-dataset/sketch/f2-025-01-sz1 f2-025-01
CUHK-student-dataset/sketch/f2-026-01-sz1 f2-026-01
CUHK-student-dataset/sketch/f2-027-01-sz1 f2-027-01
CUHK-student-dataset/sketch/f2-028-01-sz1 f2-028-01
CUHK-student-dataset/sketch/f2-029-01-sz1 f2-029-01
CUHK-student-dataset/sketch/f2-030-01-sz1 f2-030-01
CUHK-student-dataset/sketch/f2-031-01-sz1 f2-031-01
CUHK-student-dataset/sketch/f2-032-01-sz1 f2-032-01
CUHK-student-dataset/sketch/f2-033-01-sz1 f2-033-01
CUHK-student-dataset/sketch/f2-034-01-sz1 f2-034-01
CUHK-student-dataset/sketch/f2-035-01-sz1 f2-035-01
CUHK-student-dataset/sketch/f2-036-01-sz1 f2-036-01
CUHK-student-dataset/sketch/f2-037-01-sz1 f2-037-01
CUHK-student-dataset/sketch/f2-038-01-sz1 f2-038-01
CUHK-student-dataset/sketch/m-063-01-sz1 m-063-01
CUHK-student-dataset/sketch/m-064-01-sz1 m-064-01
CUHK-student-dataset/sketch/m-065-01-sz1 m-065-01
CUHK-student-dataset/sketch/m-066-01-sz1 m-066-01
CUHK-student-dataset/sketch/m-067-01-sz1 m-067-01
CUHK-student-dataset/sketch/m-068-01-sz1 m-068-01
CUHK-student-dataset/sketch/m-069-01-sz1 m-069-01
CUHK-student-dataset/sketch/m-070-01-sz1 m-070-01
CUHK-student-dataset/sketch/m-071-01-sz1 m-071-01
CUHK-student-dataset/sketch/m-072-01-sz1 m-072-01
CUHK-student-dataset/sketch/m-073-01-sz1 m-073-01
CUHK-student-dataset/sketch/m-074-01-sz1 m-074-01
CUHK-student-dataset/sketch/m-075-01-sz1 m-075-01
CUHK-student-dataset/sketch/m-076-01-sz1 m-076-01
CUHK-student-dataset/sketch/m-077-01-sz1 m-077-01
CUHK-student-dataset/sketch/m-078-01-sz1 m-078-01
CUHK-student-dataset/sketch/m-079-01-sz1 m-079-01
CUHK-student-dataset/sketch/m-080-01-sz1 m-080-01
CUHK-student-dataset/sketch/m-081-01-sz1 m-081-01
CUHK-student-dataset/sketch/m-082-01-sz1 m-082-01
CUHK-student-dataset/sketch/m-083-01-sz1 m-083-01
CUHK-student-dataset/sketch/m-084-01-sz1 m-084-01
CUHK-student-dataset/sketch/m-085-01-sz1 m-085-01
CUHK-student-dataset/sketch/m-086-01-sz1 m-086-01
CUHK-student-dataset/sketch/m-087-01-sz1 m-087-01
CUHK-student-dataset/sketch/m-088-01-sz1 m-088-01
CUHK-student-dataset/sketch/m-089-01-sz1 m-089-01
CUHK-student-dataset/sketch/m-090-01-sz1 m-090-01
CUHK-student-dataset/sketch/m-091-01-sz1 m-091-01
CUHK-student-dataset/sketch/m-092-01-sz1 m-092-01
CUHK-student-dataset/sketch/m-093-01-sz1 m-093-01
CUHK-student-dataset/sketch/m-094-01-sz1 m-094-01
CUHK-student-dataset/sketch/m-095-01-sz1 m-095-01
CUHK-student-dataset/sketch/m-096-01-sz1 m-096-01
CUHK-student-dataset/sketch/m-097-01-sz1 m-097-01
CUHK-student-dataset/sketch/m-098-01-sz1 m-098-01
CUHK-student-dataset/sketch/m-099-01-sz1 m-099-01
CUHK-student-dataset/sketch/m-100-01-sz1 m-100-01
CUHK-student-dataset/sketch/m1-001-01-sz1 m1-001-01
CUHK-student-dataset/sketch/m1-002-01-sz1 m1-002-01
CUHK-student-dataset/sketch/m1-003-01-sz1 m1-003-01
CUHK-student-dataset/sketch/m1-004-01-sz1 m1-004-01
CUHK-student-dataset/sketch/m1-005-01-sz1 m1-005-01
CUHK-student-dataset/sketch/m1-006-01-sz1 m1-006-01
CUHK-student-dataset/sketch/m1-007-01-sz1 m1-007-01
CUHK-student-dataset/sketch/m1-008-01-sz1 m1-008-01
CUHK-student-dataset/sketch/m1-009-01-sz1 m1-009-01
CUHK-student-dataset/sketch/m1-010-01-sz1 m1-010-01
CUHK-student-dataset/sketch/m-101-01-sz1 m-101-01
CUHK-student-dataset/sketch/m1-011-01-sz1 m1-011-01
CUHK-student-dataset/sketch/m1-012-01-sz1 m1-012-01
CUHK-student-dataset/sketch/m1-013-01-sz1 m1-013-01
CUHK-student-dataset/sketch/m1-014-01-sz1 m1-014-01
CUHK-student-dataset/sketch/m1-015-01-sz1 m1-015-01
CUHK-student-dataset/sketch/m1-016-01-sz1 m1-016-01
CUHK-student-dataset/sketch/m1-017-01-sz1 m1-017-01
CUHK-student-dataset/sketch/m1-018-01-sz1 m1-018-01
CUHK-student-dataset/sketch/m1-019-01-sz1 m1-019-01
CUHK-student-dataset/sketch/m1-020-01-sz1 m1-020-01
CUHK-student-dataset/sketch/m1-021-01-sz1 m1-021-01
CUHK-student-dataset/sketch/m1-022-01-sz1 m1-022-01
CUHK-student-dataset/sketch/m1-023-01-sz1 m1-023-01
CUHK-student-dataset/sketch/m1-024-01-sz1 m1-024-01
CUHK-student-dataset/sketch/m1-025-01-sz1 m1-025-01
CUHK-student-dataset/sketch/m1-026-01-sz1 m1-026-01
CUHK-student-dataset/sketch/m1-027-01-sz1 m1-027-01
CUHK-student-dataset/sketch/m1-028-01-sz1 m1-028-01
CUHK-student-dataset/sketch/m1-029-01-sz1 m1-029-01
CUHK-student-dataset/sketch/m1-030-01-sz1 m1-030-01
CUHK-student-dataset/sketch/m1-031-01-sz1 m1-031-01
CUHK-student-dataset/sketch/m1-032-01-sz1 m1-032-01
CUHK-student-dataset/sketch/m1-033-01-sz1 m1-033-01
CUHK-student-dataset/sketch/m1-034-01-sz1 m1-034-01
CUHK-student-dataset/sketch/m1-035-01-sz1 m1-035-01
CUHK-student-dataset/sketch/m1-036-01-sz1 m1-036-01
CUHK-student-dataset/sketch/m1-037-01-sz1 m1-037-01
CUHK-student-dataset/sketch/m1-038-01-sz1 m1-038-01
CUHK-student-dataset/sketch/m1-039-01-sz1 m1-039-01
CUHK-student-dataset/sketch/m1-040-01-sz1 m1-040-01
CUHK-student-dataset/sketch/m1-041-01-sz1 m1-041-01
CUHK-student-dataset/sketch/m2-008-01-sz1 m2-008-01
CUHK-student-dataset/sketch/m2-009-01-sz1 m2-009-01
CUHK-student-dataset/sketch/m2-010-01-sz1 m2-010-01
CUHK-student-dataset/sketch/m2-011-01-sz1 m2-011-01
CUHK-student-dataset/sketch/m2-012-01-sz1 m2-012-01
CUHK-student-dataset/sketch/m2-013-01-sz1 m2-013-01
CUHK-student-dataset/sketch/m2-014-01-sz1 m2-014-01
CUHK-student-dataset/sketch/m2-015-01-sz1 m2-015-01
CUHK-student-dataset/sketch/m2-016-01-sz1 m2-016-01
CUHK-student-dataset/sketch/m2-017-01-sz1 m2-017-01
CUHK-student-dataset/sketch/m2-018-01-sz1 m2-018-01
CUHK-student-dataset/sketch/m2-019-01-sz1 m2-019-01
CUHK-student-dataset/sketch/m2-021-01-sz1 m2-021-01
CUHK-student-dataset/sketch/m2-022-01-sz1 m2-022-01
CUHK-student-dataset/sketch/m2-023-01-sz1 m2-023-01
CUHK-student-dataset/sketch/m2-024-01-sz1 m2-024-01
CUHK-student-dataset/sketch/m2-025-01-sz1 m2-025-01
CUHK-student-dataset/sketch/m2-026-01-sz1 m2-026-01
CUHK-student-dataset/sketch/m2-027-01-sz1 m2-027-01
CUHK-student-dataset/sketch/m2-028-01-sz1 m2-028-01
CUHK-student-dataset/sketch/m2-029-01-sz1 m2-029-01
CUHK-student-dataset/sketch/m2-030-01-sz1 m2-030-01
CUHK-student-dataset/sketch/m2-031-01-sz1 m2-031-01
CUHK-student-dataset/sketch/m2-032-01-sz1 m2-032-01
CUHK-student-dataset/sketch/m2-033-01-sz1 m2-033-01
CUHK-student-dataset/sketch/m2-034-01-sz1 m2-034-01
CUHK-student-dataset/sketch/m2-035-01-sz1 m2-035-01
CUHK-student-dataset/sketch/m2-036-01-sz1 m2-036-01
CUHK-student-dataset/sketch/m2-037-01-sz1 m2-037-01
CUHK-student-dataset/sketch/m2-038-01-sz1 m2-038-01
CUHK-student-dataset/sketch/m2-039-01-sz1 m2-039-01
CUHK-student-dataset/sketch/m2-040-01-sz1 m2-040-01
CUHK-student-dataset/sketch/m2-041-01-sz1 m2-041-01
CUHK-student-dataset/sketch/m2-042-01-sz1 m2-042-01
CUHK-student-dataset/sketch/m2-043-01-sz1 m2-043-01
CUHK-student-dataset/sketch/m2-044-01-sz1 m2-044-01
CUHK-student-dataset/sketch/m2-045-01-sz1 m2-045-01
CUHK-student-dataset/sketch/m2-046-01-sz1 m2-046-01
CUHK-student-dataset/sketch/m2-047-01-sz1 m2-047-01
CUHK-student-dataset/sketch/m2-048-01-sz1 m2-048-01
CUHK-student-dataset/sketch/m2-049-01-sz1 m2-049-01
CUHK-student-dataset/sketch/m2-050-01-sz1 m2-050-01
CUHK-student-dataset/sketch/m2-051-01-sz1 m2-051-01
CUHK-student-dataset/sketch/m2-052-01-sz1 m2-052-01
CUHK-student-dataset/sketch/m2-053-01-sz1 m2-053-01
CUHK-student-dataset/sketch/m2-054-01-sz1 m2-054-01
CUHK-student-dataset/sketch/m2-055-01-sz1 m2-055-01
CUHK-student-dataset/sketch/m2-056-01-sz1 m2-056-01
CUHK-student-dataset/sketch/m2-057-01-sz1 m2-057-01
CUHK-student-dataset/sketch/m2-058-01-sz1 m2-058-01
CUHK-student-dataset/sketch/m2-059-01-sz1 m2-059-01
CUHK-student-dataset/sketch/m2-060-01-sz1 m2-060-01
CUHK-student-dataset/sketch/m2-061-01-sz1 m2-061-01
CUHK-student-dataset/sketch/m2-062-01-sz1 m2-062-01
CUHK-student-dataset/photo/f-005-01 f-005-01
CUHK-student-dataset/photo/f-006-01 f-006-01
CUHK-student-dataset/photo/f-007-01 f-007-01
CUHK-student-dataset/photo/f-008-01 f-008-01
CUHK-student-dataset/photo/f-009-01 f-009-01
CUHK-student-dataset/photo/f-010-01 f-010-01
CUHK-student-dataset/photo/f-011-01 f-011-01
CUHK-student-dataset/photo/f-012-01 f-012-01
CUHK-student-dataset/photo/f-013-01 f-013-01
CUHK-student-dataset/photo/f-014-01 f-014-01
CUHK-student-dataset/photo/f-015-01 f-015-01
CUHK-student-dataset/photo/f-016-01 f-016-01
CUHK-student-dataset/photo/f-017-01 f-017-01
CUHK-student-dataset/photo/f-018-01 f-018-01
CUHK-student-dataset/photo/f-019-01 f-019-01
CUHK-student-dataset/photo/f-020-01 f-020-01
CUHK-student-dataset/photo/f-021-01 f-021-01
CUHK-student-dataset/photo/f-022-01 f-022-01
CUHK-student-dataset/photo/f-023-01 f-023-01
CUHK-student-dataset/photo/f-024-01 f-024-01
CUHK-student-dataset/photo/f-025-01 f-025-01
CUHK-student-dataset/photo/f-026-01 f-026-01