diff --git a/bob/db/cuhk/test.py b/bob/db/cuhk/test.py deleted file mode 100644 index dfa01766d4e2da4fc6415f92ddfb13280b0bfdfc..0000000000000000000000000000000000000000 --- a/bob/db/cuhk/test.py +++ /dev/null @@ -1,340 +0,0 @@ -#!/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 - - - - - - diff --git a/bob/db/cuhk/__init__.py b/bob/db/cuhk_cufs/__init__.py similarity index 93% rename from bob/db/cuhk/__init__.py rename to bob/db/cuhk_cufs/__init__.py index 27449873a2bc8219729753a0db10eb3f3027ce59..7e77756c97275496311b49ae9dfcd5335220c8b1 100644 --- a/bob/db/cuhk/__init__.py +++ b/bob/db/cuhk_cufs/__init__.py @@ -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. diff --git a/bob/db/cuhk/create.py b/bob/db/cuhk_cufs/create.py similarity index 99% rename from bob/db/cuhk/create.py rename to bob/db/cuhk_cufs/create.py index e8c0c06eac49e41f5c4419dee894c81be76b3e7c..4b0ef1bda45de776e347981825bfd97b6b834a26 100644 --- a/bob/db/cuhk/create.py +++ b/bob/db/cuhk_cufs/create.py @@ -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)) diff --git a/bob/db/cuhk/data/AR_file_names_of_photos.txt b/bob/db/cuhk_cufs/data/AR_file_names_of_photos.txt similarity index 100% rename from bob/db/cuhk/data/AR_file_names_of_photos.txt rename to bob/db/cuhk_cufs/data/AR_file_names_of_photos.txt diff --git a/bob/db/cuhk/data/AR_file_names_of_sketches.txt b/bob/db/cuhk_cufs/data/AR_file_names_of_sketches.txt similarity index 100% rename from bob/db/cuhk/data/AR_file_names_of_sketches.txt rename to bob/db/cuhk_cufs/data/AR_file_names_of_sketches.txt diff --git a/bob/db/cuhk/data/XM2VTS_file_names_of_photos.txt b/bob/db/cuhk_cufs/data/XM2VTS_file_names_of_photos.txt similarity index 100% rename from bob/db/cuhk/data/XM2VTS_file_names_of_photos.txt rename to bob/db/cuhk_cufs/data/XM2VTS_file_names_of_photos.txt diff --git a/bob/db/cuhk/data/XM2VTS_file_names_of_sketches.txt b/bob/db/cuhk_cufs/data/XM2VTS_file_names_of_sketches.txt similarity index 100% rename from bob/db/cuhk/data/XM2VTS_file_names_of_sketches.txt rename to bob/db/cuhk_cufs/data/XM2VTS_file_names_of_sketches.txt diff --git a/bob/db/cuhk/data/all-cuhk.txt b/bob/db/cuhk_cufs/data/all-cuhk.txt similarity index 100% rename from bob/db/cuhk/data/all-cuhk.txt rename to bob/db/cuhk_cufs/data/all-cuhk.txt diff --git a/bob/db/cuhk_cufs/data/copy of all-cuhk.txt b/bob/db/cuhk_cufs/data/copy of all-cuhk.txt new file mode 100644 index 0000000000000000000000000000000000000000..310548228faf1b5ef9e7d003c18e0505e10a1b90 --- /dev/null +++ b/bob/db/cuhk_cufs/data/copy of all-cuhk.txt @@ -0,0 +1,376 @@ +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 +CUHK-student-dataset/photo/f-027-01 f-027-01 +CUHK-student-dataset/photo/f-028-01 f-028-01 +CUHK-student-dataset/photo/f-029-01 f-029-01 +CUHK-student-dataset/photo/f-030-01 f-030-01 +CUHK-student-dataset/photo/f-031-01 f-031-01 +CUHK-student-dataset/photo/f-032-01 f-032-01 +CUHK-student-dataset/photo/f-033-01 f-033-01 +CUHK-student-dataset/photo/f-034-01 f-034-01 +CUHK-student-dataset/photo/f-035-01 f-035-01 +CUHK-student-dataset/photo/f-036-01 f-036-01 +CUHK-student-dataset/photo/f-037-01 f-037-01 +CUHK-student-dataset/photo/f-038-01 f-038-01 +CUHK-student-dataset/photo/f-039-01 f-039-01 +CUHK-student-dataset/photo/f-040-01 f-040-01 +CUHK-student-dataset/photo/f-041-01 f-041-01 +CUHK-student-dataset/photo/f-042-01 f-042-01 +CUHK-student-dataset/photo/f-043-01 f-043-01 +CUHK-student-dataset/photo/f1-001-01 f1-001-01 +CUHK-student-dataset/photo/f1-002-01 f1-002-01 +CUHK-student-dataset/photo/f1-003-01 f1-003-01 +CUHK-student-dataset/photo/f1-004-01 f1-004-01 +CUHK-student-dataset/photo/f1-005-01 f1-005-01 +CUHK-student-dataset/photo/f1-006-01 f1-006-01 +CUHK-student-dataset/photo/f1-007-01 f1-007-01 +CUHK-student-dataset/photo/f1-008-01 f1-008-01 +CUHK-student-dataset/photo/f1-009-01 f1-009-01 +CUHK-student-dataset/photo/f1-010-01 f1-010-01 +CUHK-student-dataset/photo/f1-011-01 f1-011-01 +CUHK-student-dataset/photo/f1-012-01 f1-012-01 +CUHK-student-dataset/photo/f1-013-01 f1-013-01 +CUHK-student-dataset/photo/f1-014-01 f1-014-01 +CUHK-student-dataset/photo/f1-015-01 f1-015-01 +CUHK-student-dataset/photo/m-008-01 m-008-01 +CUHK-student-dataset/photo/m-009-01 m-009-01 +CUHK-student-dataset/photo/m-010-01 m-010-01 +CUHK-student-dataset/photo/m-011-01 m-011-01 +CUHK-student-dataset/photo/m-012-01 m-012-01 +CUHK-student-dataset/photo/m-013-01 m-013-01 +CUHK-student-dataset/photo/m-014-01 m-014-01 +CUHK-student-dataset/photo/m-015-01 m-015-01 +CUHK-student-dataset/photo/m-016-01 m-016-01 +CUHK-student-dataset/photo/m-017-01 m-017-01 +CUHK-student-dataset/photo/m-018-01 m-018-01 +CUHK-student-dataset/photo/m-019-01 m-019-01 +CUHK-student-dataset/photo/m-021-01 m-021-01 +CUHK-student-dataset/photo/m-022-01 m-022-01 +CUHK-student-dataset/photo/m-023-01 m-023-01 +CUHK-student-dataset/photo/m-024-01 m-024-01 +CUHK-student-dataset/photo/m-025-01 m-025-01 +CUHK-student-dataset/photo/m-026-01 m-026-01 +CUHK-student-dataset/photo/m-027-01 m-027-01 +CUHK-student-dataset/photo/m-028-01 m-028-01 +CUHK-student-dataset/photo/m-029-01 m-029-01 +CUHK-student-dataset/photo/m-030-01 m-030-01 +CUHK-student-dataset/photo/m-031-01 m-031-01 +CUHK-student-dataset/photo/m-032-01 m-032-01 +CUHK-student-dataset/photo/m-033-01 m-033-01 +CUHK-student-dataset/photo/m-034-01 m-034-01 +CUHK-student-dataset/photo/m-035-01 m-035-01 +CUHK-student-dataset/photo/m-036-01 m-036-01 +CUHK-student-dataset/photo/m-037-01 m-037-01 +CUHK-student-dataset/photo/m-038-01 m-038-01 +CUHK-student-dataset/photo/m-039-01 m-039-01 +CUHK-student-dataset/photo/m-040-01 m-040-01 +CUHK-student-dataset/photo/m-041-01 m-041-01 +CUHK-student-dataset/photo/m-042-01 m-042-01 +CUHK-student-dataset/photo/m-043-01 m-043-01 +CUHK-student-dataset/photo/m-044-01 m-044-01 +CUHK-student-dataset/photo/m-045-01 m-045-01 +CUHK-student-dataset/photo/m-046-01 m-046-01 +CUHK-student-dataset/photo/m-047-01 m-047-01 +CUHK-student-dataset/photo/m-048-01 m-048-01 +CUHK-student-dataset/photo/m-049-01 m-049-01 +CUHK-student-dataset/photo/m-050-01 m-050-01 +CUHK-student-dataset/photo/m-051-01 m-051-01 +CUHK-student-dataset/photo/m-052-01 m-052-01 +CUHK-student-dataset/photo/m-053-01 m-053-01 +CUHK-student-dataset/photo/m-054-01 m-054-01 +CUHK-student-dataset/photo/m-055-01 m-055-01 +CUHK-student-dataset/photo/m-056-01 m-056-01 +CUHK-student-dataset/photo/m-057-01 m-057-01 +CUHK-student-dataset/photo/m-058-01 m-058-01 +CUHK-student-dataset/photo/m-059-01 m-059-01 +CUHK-student-dataset/photo/m-060-01 m-060-01 +CUHK-student-dataset/photo/m-061-01 m-061-01 +CUHK-student-dataset/photo/m-062-01 m-062-01 +CUHK-student-dataset/photo/m-063-01 m-063-01 +CUHK-student-dataset/photo/m-064-01 m-064-01 +CUHK-student-dataset/photo/m-065-01 m-065-01 +CUHK-student-dataset/photo/m-066-01 m-066-01 +CUHK-student-dataset/photo/m-067-01 m-067-01 +CUHK-student-dataset/photo/m-068-01 m-068-01 +CUHK-student-dataset/photo/m-069-01 m-069-01 +CUHK-student-dataset/photo/m-070-01 m-070-01 +CUHK-student-dataset/photo/m-071-01 m-071-01 +CUHK-student-dataset/photo/m-072-01 m-072-01 +CUHK-student-dataset/photo/m-073-01 m-073-01 +CUHK-student-dataset/photo/m-074-01 m-074-01 +CUHK-student-dataset/photo/m-075-01 m-075-01 +CUHK-student-dataset/photo/m-076-01 m-076-01 +CUHK-student-dataset/photo/m-077-01 m-077-01 +CUHK-student-dataset/photo/m-078-01 m-078-01 +CUHK-student-dataset/photo/m-079-01 m-079-01 +CUHK-student-dataset/photo/m-080-01 m-080-01 +CUHK-student-dataset/photo/m-081-01 m-081-01 +CUHK-student-dataset/photo/m-082-01 m-082-01 +CUHK-student-dataset/photo/m-083-01 m-083-01 +CUHK-student-dataset/photo/m-084-01 m-084-01 +CUHK-student-dataset/photo/m-085-01 m-085-01 +CUHK-student-dataset/photo/m-086-01 m-086-01 +CUHK-student-dataset/photo/m-087-01 m-087-01 +CUHK-student-dataset/photo/m-088-01 m-088-01 +CUHK-student-dataset/photo/m-089-01 m-089-01 +CUHK-student-dataset/photo/m-090-01 m-090-01 +CUHK-student-dataset/photo/m-091-01 m-091-01 +CUHK-student-dataset/photo/m-092-01 m-092-01 +CUHK-student-dataset/photo/m-093-01 m-093-01 +CUHK-student-dataset/photo/m-094-01 m-094-01 +CUHK-student-dataset/photo/m-095-01 m-095-01 +CUHK-student-dataset/photo/m-096-01 m-096-01 +CUHK-student-dataset/photo/m-097-01 m-097-01 +CUHK-student-dataset/photo/m-098-01 m-098-01 +CUHK-student-dataset/photo/m-099-01 m-099-01 +CUHK-student-dataset/photo/m-100-01 m-100-01 +CUHK-student-dataset/photo/m1-001-01 m1-001-01 +CUHK-student-dataset/photo/m1-002-01 m1-002-01 +CUHK-student-dataset/photo/m1-003-01 m1-003-01 +CUHK-student-dataset/photo/m1-004-01 m1-004-01 +CUHK-student-dataset/photo/m1-005-01 m1-005-01 +CUHK-student-dataset/photo/m1-006-01 m1-006-01 +CUHK-student-dataset/photo/m1-007-01 m1-007-01 +CUHK-student-dataset/photo/m1-008-01 m1-008-01 +CUHK-student-dataset/photo/m1-009-01 m1-009-01 +CUHK-student-dataset/photo/m1-010-01 m1-010-01 +CUHK-student-dataset/photo/m-101-01 m-101-01 +CUHK-student-dataset/photo/m1-011-01 m1-011-01 +CUHK-student-dataset/photo/m1-012-01 m1-012-01 +CUHK-student-dataset/photo/m1-013-01 m1-013-01 +CUHK-student-dataset/photo/m1-014-01 m1-014-01 +CUHK-student-dataset/photo/m1-015-01 m1-015-01 +CUHK-student-dataset/photo/m1-016-01 m1-016-01 +CUHK-student-dataset/photo/m1-017-01 m1-017-01 +CUHK-student-dataset/photo/m1-018-01 m1-018-01 +CUHK-student-dataset/photo/m1-019-01 m1-019-01 +CUHK-student-dataset/photo/m1-020-01 m1-020-01 +CUHK-student-dataset/photo/m1-021-01 m1-021-01 +CUHK-student-dataset/photo/m1-022-01 m1-022-01 +CUHK-student-dataset/photo/m1-023-01 m1-023-01 +CUHK-student-dataset/photo/m1-024-01 m1-024-01 +CUHK-student-dataset/photo/m1-025-01 m1-025-01 +CUHK-student-dataset/photo/m1-026-01 m1-026-01 +CUHK-student-dataset/photo/m1-027-01 m1-027-01 +CUHK-student-dataset/photo/m1-028-01 m1-028-01 +CUHK-student-dataset/photo/m1-029-01 m1-029-01 +CUHK-student-dataset/photo/m1-030-01 m1-030-01 +CUHK-student-dataset/photo/m1-031-01 m1-031-01 +CUHK-student-dataset/photo/m1-032-01 m1-032-01 +CUHK-student-dataset/photo/m1-033-01 m1-033-01 +CUHK-student-dataset/photo/m1-034-01 m1-034-01 +CUHK-student-dataset/photo/m1-035-01 m1-035-01 +CUHK-student-dataset/photo/m1-036-01 m1-036-01 +CUHK-student-dataset/photo/m1-037-01 m1-037-01 +CUHK-student-dataset/photo/m1-038-01 m1-038-01 +CUHK-student-dataset/photo/m1-039-01 m1-039-01 +CUHK-student-dataset/photo/m1-040-01 m1-040-01 +CUHK-student-dataset/photo/m1-041-01 m1-041-01 diff --git a/bob/db/cuhk_cufs/db.sql3 b/bob/db/cuhk_cufs/db.sql3 new file mode 100644 index 0000000000000000000000000000000000000000..bf1720db86c78e40f3e836ba96fd8ff1bea29675 Binary files /dev/null and b/bob/db/cuhk_cufs/db.sql3 differ diff --git a/bob/db/cuhk/driver.py b/bob/db/cuhk_cufs/driver.py similarity index 99% rename from bob/db/cuhk/driver.py rename to bob/db/cuhk_cufs/driver.py index 4177484aede38a7206edbd3f25baa1645a349c34..fd5db157d4ce95c7de8a002b48af97d253093054 100644 --- a/bob/db/cuhk/driver.py +++ b/bob/db/cuhk_cufs/driver.py @@ -80,7 +80,7 @@ def checkfiles(args): class Interface(BaseInterface): def name(self): - return 'cuhk' + return 'cuhk_cufs' def version(self): import pkg_resources # part of setuptools diff --git a/bob/db/cuhk_cufs/lists_old/AR_file_names_of_photos.txt b/bob/db/cuhk_cufs/lists_old/AR_file_names_of_photos.txt new file mode 100755 index 0000000000000000000000000000000000000000..1e370acf5171f3d14755f9367902bb82686061ae --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/AR_file_names_of_photos.txt @@ -0,0 +1,123 @@ + 'm-002-1' + 'm-003-1' + 'm-005-1' + 'm-006-1' + 'm-007-1' + 'm-008-1' + 'm-009-1' + 'm-010-1' + 'm-011-1' + 'm-013-1' + 'm-014-1' + 'm-015-1' + 'm-016-1' + 'm-017-1' + 'm-018-1' + 'm-020-1' + 'm-021-1' + 'm-022-1' + 'm-023-1' + 'm-024-1' + 'm-025-1' + 'm-026-1' + 'm-027-1' + 'm-028-1' + 'm-029-1' + 'm-030-1' + 'm-031-1' + 'm-032-1' + 'm-033-1' + 'm-035-1' + 'm-036-1' + 'm-037-1' + 'm-038-1' + 'm-039-1' + 'm-040-1' + 'm-041-1' + 'm-042-1' + 'm-043-1' + 'm-044-1' + 'm-045-1' + 'm-046-1' + 'm-047-1' + 'm-048-1' + 'm-049-1' + 'm-050-1' + 'm-051-1' + 'm-052-1' + 'm-053-1' + 'm-054-1' + 'm-055-1' + 'm-056-1' + 'm-057-1' + 'm-058-1' + 'm-059-1' + 'm-060-1' + 'm-061-1' + 'm-062-1' + 'm-063-1' + 'm-064-1' + 'm-065-1' + 'm-066-1' + 'm-067-1' + 'm-068-1' + 'm-069-1' + 'm-070-1' + 'm-071-1' + 'm-072-1' + 'm-073-1' + 'm-074-1' + 'm-075-1' + 'w-001-1' + 'w-002-1' + 'w-003-1' + 'w-004-1' + 'w-005-1' + 'w-007-1' + 'w-008-1' + 'w-014-1' + 'w-015-1' + 'w-016-1' + 'w-017-1' + 'w-018-1' + 'w-019-1' + 'w-020-1' + 'w-021-1' + 'w-022-1' + 'w-023-1' + 'w-024-1' + 'w-025-1' + 'w-026-1' + 'w-027-1' + 'w-028-1' + 'w-029-1' + 'w-030-1' + 'w-031-1' + 'w-032-1' + 'w-033-1' + 'w-034-1' + 'w-035-1' + 'w-036-1' + 'w-037-1' + 'w-038-1' + 'w-039-1' + 'w-040-1' + 'w-041-1' + 'w-042-1' + 'w-043-1' + 'w-044-1' + 'w-045-1' + 'w-046-1' + 'w-047-1' + 'w-048-1' + 'w-049-1' + 'w-050-1' + 'w-051-1' + 'w-052-1' + 'w-053-1' + 'w-054-1' + 'w-055-1' + 'w-056-1' + 'w-057-1' + 'w-058-1' + 'w-059-1' \ No newline at end of file diff --git a/bob/db/cuhk_cufs/lists_old/README b/bob/db/cuhk_cufs/lists_old/README new file mode 100644 index 0000000000000000000000000000000000000000..9ab0204d09ba9a525ff81bc9448a667650760614 --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/README @@ -0,0 +1,15 @@ +This database has 5 protocols. +For the moment only one protocol is developed + + +CUHK protocol, 188 pairs in total + +57 for training +56 for development +75 for testing + + + + + + diff --git a/bob/db/cuhk_cufs/lists_old/XM2VTS_file_names_of_photos.txt b/bob/db/cuhk_cufs/lists_old/XM2VTS_file_names_of_photos.txt new file mode 100755 index 0000000000000000000000000000000000000000..225bc9769585e794b118253312e1d7c9dec9605a --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/XM2VTS_file_names_of_photos.txt @@ -0,0 +1,295 @@ + '000_1_1' + '001_1_1' + '002_1_1' + '003_1_1' + '004_1_1' + '005_1_1' + '006_1_1' + '007_1_1' + '008_1_1' + '009_1_1' + '010_1_1' + '011_1_1' + '012_1_1' + '013_1_1' + '016_1_1' + '017_1_1' + '018_1_1' + '019_1_1' + '020_1_1' + '021_1_1' + '022_1_1' + '023_1_1' + '024_1_1' + '025_1_1' + '026_1_1' + '027_1_1' + '028_1_1' + '029_1_1' + '030_1_1' + '031_1_1' + '032_1_1' + '033_1_1' + '034_1_1' + '035_1_1' + '036_1_1' + '037_1_1' + '038_1_1' + '039_1_1' + '040_1_1' + '041_1_1' + '042_1_1' + '043_1_1' + '044_1_1' + '045_1_1' + '046_1_1' + '047_1_1' + '048_1_1' + '049_1_1' + '050_1_1' + '051_1_1' + '052_1_1' + '053_1_1' + '054_1_1' + '055_1_1' + '056_1_1' + '057_1_1' + '058_1_1' + '059_1_1' + '060_1_1' + '061_1_1' + '062_1_1' + '064_1_1' + '065_1_1' + '066_1_1' + '067_1_1' + '068_1_1' + '069_1_1' + '070_1_1' + '071_1_1' + '072_1_1' + '073_1_1' + '074_1_1' + '075_1_1' + '078_1_1' + '079_1_1' + '080_1_1' + '081_1_1' + '082_1_1' + '083_1_1' + '085_1_1' + '086_1_1' + '087_1_1' + '088_1_1' + '089_1_1' + '090_1_1' + '091_1_1' + '092_1_1' + '093_1_1' + '095_1_1' + '096_1_1' + '098_1_1' + '099_1_1' + '101_1_1' + '102_1_1' + '103_1_1' + '104_1_1' + '105_1_1' + '107_1_1' + '108_1_1' + '109_1_1' + '110_1_1' + '111_1_1' + '112_1_1' + '113_1_1' + '114_1_1' + '115_1_1' + '116_1_1' + '119_1_1' + '120_1_1' + '121_1_1' + '122_1_1' + '123_1_1' + '124_1_1' + '125_1_1' + '126_1_1' + '127_1_1' + '128_1_1' + '129_1_1' + '130_1_1' + '131_1_1' + '132_1_1' + '133_1_1' + '134_1_1' + '135_1_1' + '136_1_1' + '137_1_1' + '138_1_1' + '140_1_1' + '141_1_1' + '142_1_1' + '143_1_1' + '145_1_1' + '146_1_1' + '147_1_1' + '148_1_1' + '149_1_1' + '150_1_1' + '152_1_1' + '153_1_1' + '154_1_1' + '155_1_1' + '157_1_1' + '158_1_1' + '159_1_1' + '160_1_1' + '161_1_1' + '163_1_1' + '164_1_1' + '165_1_1' + '166_1_1' + '167_1_1' + '168_1_1' + '169_1_1' + '170_1_1' + '171_1_1' + '172_1_1' + '173_1_1' + '174_1_1' + '175_1_1' + '176_1_1' + '177_1_1' + '178_1_1' + '179_1_1' + '180_1_1' + '181_1_1' + '182_1_1' + '183_1_1' + '185_1_1' + '187_1_1' + '188_1_1' + '189_1_1' + '190_1_1' + '191_1_1' + '193_1_1' + '196_1_1' + '197_1_1' + '198_1_1' + '199_1_1' + '200_1_1' + '201_1_1' + '202_1_1' + '203_1_1' + '206_1_1' + '207_1_1' + '208_1_1' + '209_1_1' + '210_1_1' + '211_1_1' + '212_1_1' + '213_1_1' + '215_1_1' + '216_1_1' + '218_1_1' + '219_1_1' + '221_1_1' + '222_1_1' + '224_1_1' + '225_1_1' + '226_1_1' + '227_1_1' + '228_1_1' + '229_1_1' + '231_1_1' + '232_1_1' + '233_1_1' + '234_1_1' + '235_1_1' + '236_1_1' + '237_1_1' + '240_1_1' + '241_1_1' + '242_1_1' + '243_1_1' + '244_1_1' + '246_1_1' + '248_1_1' + '249_1_1' + '250_1_1' + '253_1_1' + '255_1_1' + '258_1_1' + '259_1_1' + '261_1_1' + '263_1_1' + '264_1_1' + '266_1_1' + '267_1_1' + '269_1_1' + '270_1_1' + '271_1_1' + '272_1_1' + '274_1_1' + '275_1_1' + '276_1_1' + '278_1_1' + '279_1_1' + '280_1_1' + '281_1_1' + '282_1_1' + '283_1_1' + '284_1_1' + '285_1_1' + '286_1_1' + '287_1_1' + '288_1_1' + '289_1_1' + '290_1_1' + '292_1_1' + '293_1_1' + '295_1_1' + '300_1_1' + '301_1_1' + '305_1_1' + '310_1_1' + '312_1_1' + '313_1_1' + '314_1_1' + '315_1_1' + '316_1_1' + '317_1_1' + '318_1_1' + '319_1_1' + '320_1_1' + '321_1_1' + '322_1_1' + '323_1_1' + '324_1_1' + '325_1_1' + '328_1_1' + '329_1_1' + '330_1_1' + '331_1_1' + '332_1_1' + '333_1_1' + '334_1_1' + '335_1_1' + '336_1_1' + '337_1_1' + '338_1_1' + '339_1_1' + '340_1_1' + '341_1_1' + '342_1_1' + '357_1_1' + '358_1_1' + '359_1_1' + '360_1_1' + '362_1_1' + '364_1_1' + '365_1_1' + '366_1_1' + '367_1_1' + '369_1_1' + '370_1_1' + '371_1_1' \ No newline at end of file diff --git a/bob/db/cuhk_cufs/lists_old/all-cuhk.lst b/bob/db/cuhk_cufs/lists_old/all-cuhk.lst new file mode 100644 index 0000000000000000000000000000000000000000..07a5976726f946848d69fab8226d1b1396bba464 --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/all-cuhk.lst @@ -0,0 +1,376 @@ +photos/f-005-01 f005 +sketches/F2-005-01-sz1 f005 +photos/f-006-01 f006 +sketches/F2-006-01-sz1 f006 +photos/f-007-01 f007 +sketches/F2-007-01-sz1 f007 +photos/f-008-01 f008 +sketches/F2-008-01-sz1 f008 +photos/f-009-01 f009 +sketches/F2-009-01-sz1 f009 +photos/f-010-01 f010 +sketches/F2-010-01-sz1 f010 +photos/f-011-01 f011 +sketches/F2-011-01-sz1 f011 +photos/f-012-01 f012 +sketches/F2-012-01-sz1 f012 +photos/f-013-01 f013 +sketches/F2-013-01-sz1 f013 +photos/f-014-01 f014 +sketches/F2-014-01-sz1 f014 +photos/f-015-01 f015 +sketches/F2-015-01-sz1 f015 +photos/f-016-01 f016 +sketches/F2-016-01-sz1 f016 +photos/f-017-01 f017 +sketches/F2-017-01-sz1 f017 +photos/f-018-01 f018 +sketches/F2-018-01-sz1 f018 +photos/f-019-01 f019 +sketches/F2-019-01-sz1 f019 +photos/f-020-01 f020 +sketches/F2-020-01-sz1 f020 +photos/f-021-01 f021 +sketches/F2-021-01-sz1 f021 +photos/f-022-01 f022 +sketches/F2-022-01-sz1 f022 +photos/f-023-01 f023 +sketches/F2-023-01-sz1 f023 +photos/f-024-01 f024 +sketches/F2-024-01-sz1 f024 +photos/f-025-01 f025 +sketches/F2-025-01-sz1 f025 +photos/f-026-01 f026 +sketches/F2-026-01-sz1 f026 +photos/f-027-01 f027 +sketches/F2-027-01-sz1 f027 +photos/f-028-01 f028 +sketches/F2-028-01-sz1 f028 +photos/f-029-01 f029 +sketches/F2-029-01-sz1 f029 +photos/f-030-01 f030 +sketches/F2-030-01-sz1 f030 +photos/f-031-01 f031 +sketches/F2-031-01-sz1 f031 +photos/f-032-01 f032 +sketches/F2-032-01-sz1 f032 +photos/f-033-01 f033 +sketches/F2-033-01-sz1 f033 +photos/f-034-01 f034 +sketches/F2-034-01-sz1 f034 +photos/f-035-01 f035 +sketches/F2-035-01-sz1 f035 +photos/f-036-01 f036 +sketches/F2-036-01-sz1 f036 +photos/f-037-01 f037 +sketches/F2-037-01-sz1 f037 +photos/f-038-01 f038 +sketches/F2-038-01-sz1 f038 +photos/f-039-01 f039 +sketches/f-039-01-sz1 f039 +photos/f-040-01 f040 +sketches/f-040-01-sz1 f040 +photos/f-041-01 f041 +sketches/f-041-01-sz1 f041 +photos/f-042-01 f042 +sketches/f-042-01-sz1 f042 +photos/f-043-01 f043 +sketches/f-043-01-sz1 f043 +photos/f1-001-01 f1001 +sketches/f1-001-01-sz1 f1001 +photos/f1-002-01 f1002 +sketches/f1-002-01-sz1 f1002 +photos/f1-003-01 f1003 +sketches/f1-003-01-sz1 f1003 +photos/f1-004-01 f1004 +sketches/f1-004-01-sz1 f1004 +photos/f1-005-01 f1005 +sketches/f1-005-01-sz1 f1005 +photos/f1-006-01 f1006 +sketches/f1-006-01-sz1 f1006 +photos/f1-007-01 f1007 +sketches/f1-007-01-sz1 f1007 +photos/f1-008-01 f1008 +sketches/f1-008-01-sz1 f1008 +photos/f1-009-01 f1009 +sketches/f1-009-01-sz1 f1009 +photos/f1-010-01 f1010 +sketches/f1-010-01-sz1 f1010 +photos/f1-011-01 f1011 +sketches/f1-011-01-sz1 f1011 +photos/f1-012-01 f1012 +sketches/f1-012-01-sz1 f1012 +photos/f1-013-01 f1013 +sketches/f1-013-01-sz1 f1013 +photos/f1-014-01 f1014 +sketches/f1-014-01-sz1 f1014 +photos/f1-015-01 f1015 +sketches/f1-015-01-sz1 f1015 +photos/m-008-01 m008 +sketches/M2-008-01-sz1 m008 +photos/m-009-01 m009 +sketches/M2-009-01-sz1 m009 +photos/m-010-01 m010 +sketches/M2-010-01-sz1 m010 +photos/m-011-01 m011 +sketches/M2-011-01-sz1 m011 +photos/m-012-01 m012 +sketches/M2-012-01-sz1 m012 +photos/m-013-01 m013 +sketches/M2-013-01-sz1 m013 +photos/m-014-01 m014 +sketches/M2-014-01-sz1 m014 +photos/m-015-01 m015 +sketches/M2-015-01-sz1 m015 +photos/m-016-01 m016 +sketches/M2-016-01-sz1 m016 +photos/m-017-01 m017 +sketches/M2-017-01-sz1 m017 +photos/m-018-01 m018 +sketches/M2-018-01-sz1 m018 +photos/m-019-01 m019 +sketches/M2-019-01-sz1 m019 +photos/m-021-01 m021 +sketches/M2-021-01-sz1 m021 +photos/m-022-01 m022 +sketches/M2-022-01-sz1 m022 +photos/m-023-01 m023 +sketches/M2-023-01-sz1 m023 +photos/m-024-01 m024 +sketches/M2-024-01-sz1 m024 +photos/m-025-01 m025 +sketches/M2-025-01-sz1 m025 +photos/m-026-01 m026 +sketches/M2-026-01-sz1 m026 +photos/m-027-01 m027 +sketches/M2-027-01-sz1 m027 +photos/m-028-01 m028 +sketches/M2-028-01-sz1 m028 +photos/m-029-01 m029 +sketches/M2-029-01-sz1 m029 +photos/m-030-01 m030 +sketches/M2-030-01-sz1 m030 +photos/m-031-01 m031 +sketches/M2-031-01-sz1 m031 +photos/m-032-01 m032 +sketches/M2-032-01-sz1 m032 +photos/m-033-01 m033 +sketches/M2-033-01-sz1 m033 +photos/m-034-01 m034 +sketches/M2-034-01-sz1 m034 +photos/m-035-01 m035 +sketches/M2-035-01-sz1 m035 +photos/m-036-01 m036 +sketches/M2-036-01-sz1 m036 +photos/m-037-01 m037 +sketches/M2-037-01-sz1 m037 +photos/m-038-01 m038 +sketches/M2-038-01-sz1 m038 +photos/m-039-01 m039 +sketches/M2-039-01-sz1 m039 +photos/m-040-01 m040 +sketches/M2-040-01-sz1 m040 +photos/m-041-01 m041 +sketches/M2-041-01-sz1 m041 +photos/m-042-01 m042 +sketches/M2-042-01-sz1 m042 +photos/m-043-01 m043 +sketches/M2-043-01-sz1 m043 +photos/m-044-01 m044 +sketches/M2-044-01-sz1 m044 +photos/m-045-01 m045 +sketches/M2-045-01-sz1 m045 +photos/m-046-01 m046 +sketches/M2-046-01-sz1 m046 +photos/m-047-01 m047 +sketches/M2-047-01-sz1 m047 +photos/m-048-01 m048 +sketches/M2-048-01-sz1 m048 +photos/m-049-01 m049 +sketches/M2-049-01-sz1 m049 +photos/m-050-01 m050 +sketches/M2-050-01-sz1 m050 +photos/m-051-01 m051 +sketches/M2-051-01-sz1 m051 +photos/m-052-01 m052 +sketches/M2-052-01-sz1 m052 +photos/m-053-01 m053 +sketches/M2-053-01-sz1 m053 +photos/m-054-01 m054 +sketches/M2-054-01-sz1 m054 +photos/m-055-01 m055 +sketches/M2-055-01-sz1 m055 +photos/m-056-01 m056 +sketches/M2-056-01-sz1 m056 +photos/m-057-01 m057 +sketches/M2-057-01-sz1 m057 +photos/m-058-01 m058 +sketches/M2-058-01-sz1 m058 +photos/m-059-01 m059 +sketches/M2-059-01-sz1 m059 +photos/m-060-01 m060 +sketches/M2-060-01-sz1 m060 +photos/m-061-01 m061 +sketches/M2-061-01-sz1 m061 +photos/m-062-01 m062 +sketches/M2-062-01-sz1 m062 +photos/m-063-01 m063 +sketches/m-063-01-sz1 m063 +photos/m-064-01 m064 +sketches/m-064-01-sz1 m064 +photos/m-065-01 m065 +sketches/m-065-01-sz1 m065 +photos/m-066-01 m066 +sketches/m-066-01-sz1 m066 +photos/m-067-01 m067 +sketches/m-067-01-sz1 m067 +photos/m-068-01 m068 +sketches/m-068-01-sz1 m068 +photos/m-069-01 m069 +sketches/m-069-01-sz1 m069 +photos/m-070-01 m070 +sketches/m-070-01-sz1 m070 +photos/m-071-01 m071 +sketches/m-071-01-sz1 m071 +photos/m-072-01 m072 +sketches/m-072-01-sz1 m072 +photos/m-073-01 m073 +sketches/m-073-01-sz1 m073 +photos/m-074-01 m074 +sketches/m-074-01-sz1 m074 +photos/m-075-01 m075 +sketches/m-075-01-sz1 m075 +photos/m-076-01 m076 +sketches/m-076-01-sz1 m076 +photos/m-077-01 m077 +sketches/m-077-01-sz1 m077 +photos/m-078-01 m078 +sketches/m-078-01-sz1 m078 +photos/m-079-01 m079 +sketches/m-079-01-sz1 m079 +photos/m-080-01 m080 +sketches/m-080-01-sz1 m080 +photos/m-081-01 m081 +sketches/m-081-01-sz1 m081 +photos/m-082-01 m082 +sketches/m-082-01-sz1 m082 +photos/m-083-01 m083 +sketches/m-083-01-sz1 m083 +photos/m-084-01 m084 +sketches/m-084-01-sz1 m084 +photos/m-085-01 m085 +sketches/m-085-01-sz1 m085 +photos/m-086-01 m086 +sketches/m-086-01-sz1 m086 +photos/m-087-01 m087 +sketches/m-087-01-sz1 m087 +photos/m-088-01 m088 +sketches/m-088-01-sz1 m088 +photos/m-089-01 m089 +sketches/m-089-01-sz1 m089 +photos/m-090-01 m090 +sketches/m-090-01-sz1 m090 +photos/m-091-01 m091 +sketches/m-091-01-sz1 m091 +photos/m-092-01 m092 +sketches/m-092-01-sz1 m092 +photos/m-093-01 m093 +sketches/m-093-01-sz1 m093 +photos/m-094-01 m094 +sketches/m-094-01-sz1 m094 +photos/m-095-01 m095 +sketches/m-095-01-sz1 m095 +photos/m-096-01 m096 +sketches/m-096-01-sz1 m096 +photos/m-097-01 m097 +sketches/m-097-01-sz1 m097 +photos/m-098-01 m098 +sketches/m-098-01-sz1 m098 +photos/m-099-01 m099 +sketches/m-099-01-sz1 m099 +photos/m-100-01 m100 +sketches/m-100-01-sz1 m100 +photos/m1-001-01 m1001 +sketches/m1-001-01-sz1 m1001 +photos/m1-002-01 m1002 +sketches/m1-002-01-sz1 m1002 +photos/m1-003-01 m1003 +sketches/m1-003-01-sz1 m1003 +photos/m1-004-01 m1004 +sketches/m1-004-01-sz1 m1004 +photos/m1-005-01 m1005 +sketches/m1-005-01-sz1 m1005 +photos/m1-006-01 m1006 +sketches/m1-006-01-sz1 m1006 +photos/m1-007-01 m1007 +sketches/m1-007-01-sz1 m1007 +photos/m1-008-01 m1008 +sketches/m1-008-01-sz1 m1008 +photos/m1-009-01 m1009 +sketches/m1-009-01-sz1 m1009 +photos/m1-010-01 m1010 +sketches/m1-010-01-sz1 m1010 +photos/m-101-01 m101 +sketches/m-101-01-sz1 m101 +photos/m1-011-01 m1011 +sketches/m1-011-01-sz1 m1011 +photos/m1-012-01 m1012 +sketches/m1-012-01-sz1 m1012 +photos/m1-013-01 m1013 +sketches/m1-013-01-sz1 m1013 +photos/m1-014-01 m1014 +sketches/m1-014-01-sz1 m1014 +photos/m1-015-01 m1015 +sketches/m1-015-01-sz1 m1015 +photos/m1-016-01 m1016 +sketches/m1-016-01-sz1 m1016 +photos/m1-017-01 m1017 +sketches/m1-017-01-sz1 m1017 +photos/m1-018-01 m1018 +sketches/m1-018-01-sz1 m1018 +photos/m1-019-01 m1019 +sketches/m1-019-01-sz1 m1019 +photos/m1-020-01 m1020 +sketches/m1-020-01-sz1 m1020 +photos/m1-021-01 m1021 +sketches/m1-021-01-sz1 m1021 +photos/m1-022-01 m1022 +sketches/m1-022-01-sz1 m1022 +photos/m1-023-01 m1023 +sketches/m1-023-01-sz1 m1023 +photos/m1-024-01 m1024 +sketches/m1-024-01-sz1 m1024 +photos/m1-025-01 m1025 +sketches/m1-025-01-sz1 m1025 +photos/m1-026-01 m1026 +sketches/m1-026-01-sz1 m1026 +photos/m1-027-01 m1027 +sketches/m1-027-01-sz1 m1027 +photos/m1-028-01 m1028 +sketches/m1-028-01-sz1 m1028 +photos/m1-029-01 m1029 +sketches/m1-029-01-sz1 m1029 +photos/m1-030-01 m1030 +sketches/m1-030-01-sz1 m1030 +photos/m1-031-01 m1031 +sketches/m1-031-01-sz1 m1031 +photos/m1-032-01 m1032 +sketches/m1-032-01-sz1 m1032 +photos/m1-033-01 m1033 +sketches/m1-033-01-sz1 m1033 +photos/m1-034-01 m1034 +sketches/m1-034-01-sz1 m1034 +photos/m1-035-01 m1035 +sketches/m1-035-01-sz1 m1035 +photos/m1-036-01 m1036 +sketches/m1-036-01-sz1 m1036 +photos/m1-037-01 m1037 +sketches/m1-037-01-sz1 m1037 +photos/m1-038-01 m1038 +sketches/m1-038-01-sz1 m1038 +photos/m1-039-01 m1039 +sketches/m1-039-01-sz1 m1039 +photos/m1-040-01 m1040 +sketches/m1-040-01-sz1 m1040 +photos/m1-041-01 m1041 +sketches/m1-041-01-sz1 m1041 diff --git a/bob/db/cuhk_cufs/lists_old/cuhk/dev/for_models.lst b/bob/db/cuhk_cufs/lists_old/cuhk/dev/for_models.lst new file mode 100644 index 0000000000000000000000000000000000000000..2bed37687c5ef8a860e7cbefd44747f869b321c0 --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/cuhk/dev/for_models.lst @@ -0,0 +1,56 @@ +photos/f-015-01 f015 f015 +photos/m-055-01 m055 m055 +photos/f-007-01 f007 f007 +photos/m1-010-01 m1010 m1010 +photos/m-048-01 m048 m048 +photos/m1-034-01 m1034 m1034 +photos/f-031-01 f031 f031 +photos/m-014-01 m014 m014 +photos/m-065-01 m065 m065 +photos/f-006-01 f006 f006 +photos/m1-015-01 m1015 m1015 +photos/m-088-01 m088 m088 +photos/m-037-01 m037 m037 +photos/m-073-01 m073 m073 +photos/f1-010-01 f1010 f1010 +photos/f-010-01 f010 f010 +photos/m-041-01 m041 m041 +photos/f-036-01 f036 f036 +photos/m-071-01 m071 m071 +photos/m-012-01 m012 m012 +photos/m-026-01 m026 m026 +photos/m-010-01 m010 m010 +photos/m-016-01 m016 m016 +photos/m-034-01 m034 m034 +photos/m-087-01 m087 m087 +photos/m-035-01 m035 m035 +photos/f-018-01 f018 f018 +photos/m-057-01 m057 m057 +photos/m-052-01 m052 m052 +photos/f-013-01 f013 f013 +photos/m1-023-01 m1023 m1023 +photos/m1-011-01 m1011 m1011 +photos/m-072-01 m072 m072 +photos/f1-005-01 f1005 f1005 +photos/m1-017-01 m1017 m1017 +photos/m-054-01 m054 m054 +photos/m-013-01 m013 m013 +photos/m-045-01 m045 m045 +photos/f-033-01 f033 f033 +photos/f-021-01 f021 f021 +photos/f-038-01 f038 f038 +photos/m-053-01 m053 m053 +photos/f-030-01 f030 f030 +photos/f-027-01 f027 f027 +photos/m-056-01 m056 m056 +photos/m-064-01 m064 m064 +photos/m1-018-01 m1018 m1018 +photos/m1-033-01 m1033 m1033 +photos/m1-001-01 m1001 m1001 +photos/m-046-01 m046 m046 +photos/m1-008-01 m1008 m1008 +photos/f-040-01 f040 f040 +photos/m-068-01 m068 m068 +photos/f-029-01 f029 f029 +photos/m-027-01 m027 m027 +photos/m-084-01 m084 m084 diff --git a/bob/db/cuhk_cufs/lists_old/cuhk/dev/for_probes.lst b/bob/db/cuhk_cufs/lists_old/cuhk/dev/for_probes.lst new file mode 100644 index 0000000000000000000000000000000000000000..e56afcc1bc1c04109ca347efe9b50da2e78ca3ed --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/cuhk/dev/for_probes.lst @@ -0,0 +1,56 @@ +sketches/F2-015-01-sz1 f015 +sketches/M2-055-01-sz1 m055 +sketches/F2-007-01-sz1 f007 +sketches/m1-010-01-sz1 m1010 +sketches/M2-048-01-sz1 m048 +sketches/m1-034-01-sz1 m1034 +sketches/F2-031-01-sz1 f031 +sketches/M2-014-01-sz1 m014 +sketches/m-065-01-sz1 m065 +sketches/F2-006-01-sz1 f006 +sketches/m1-015-01-sz1 m1015 +sketches/m-088-01-sz1 m088 +sketches/M2-037-01-sz1 m037 +sketches/m-073-01-sz1 m073 +sketches/f1-010-01-sz1 f1010 +sketches/F2-010-01-sz1 f010 +sketches/M2-041-01-sz1 m041 +sketches/F2-036-01-sz1 f036 +sketches/m-071-01-sz1 m071 +sketches/M2-012-01-sz1 m012 +sketches/M2-026-01-sz1 m026 +sketches/M2-010-01-sz1 m010 +sketches/M2-016-01-sz1 m016 +sketches/M2-034-01-sz1 m034 +sketches/m-087-01-sz1 m087 +sketches/M2-035-01-sz1 m035 +sketches/F2-018-01-sz1 f018 +sketches/M2-057-01-sz1 m057 +sketches/M2-052-01-sz1 m052 +sketches/F2-013-01-sz1 f013 +sketches/m1-023-01-sz1 m1023 +sketches/m1-011-01-sz1 m1011 +sketches/m-072-01-sz1 m072 +sketches/f1-005-01-sz1 f1005 +sketches/m1-017-01-sz1 m1017 +sketches/M2-054-01-sz1 m054 +sketches/M2-013-01-sz1 m013 +sketches/M2-045-01-sz1 m045 +sketches/F2-033-01-sz1 f033 +sketches/F2-021-01-sz1 f021 +sketches/F2-038-01-sz1 f038 +sketches/M2-053-01-sz1 m053 +sketches/F2-030-01-sz1 f030 +sketches/F2-027-01-sz1 f027 +sketches/M2-056-01-sz1 m056 +sketches/m-064-01-sz1 m064 +sketches/m1-018-01-sz1 m1018 +sketches/m1-033-01-sz1 m1033 +sketches/m1-001-01-sz1 m1001 +sketches/M2-046-01-sz1 m046 +sketches/m1-008-01-sz1 m1008 +sketches/f-040-01-sz1 f040 +sketches/m-068-01-sz1 m068 +sketches/F2-029-01-sz1 f029 +sketches/M2-027-01-sz1 m027 +sketches/m-084-01-sz1 m084 diff --git a/bob/db/cuhk_cufs/lists_old/cuhk/eval/for_models.lst b/bob/db/cuhk_cufs/lists_old/cuhk/eval/for_models.lst new file mode 100644 index 0000000000000000000000000000000000000000..3e719f92a5db410dacfd48edbf7ae0adffaa7dfa --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/cuhk/eval/for_models.lst @@ -0,0 +1,75 @@ +photos/f-035-01 f035 f035 +photos/m-008-01 m008 m008 +photos/m-082-01 m082 m082 +photos/m-096-01 m096 m096 +photos/m1-040-01 m1040 m1040 +photos/m-078-01 m078 m078 +photos/m1-004-01 m1004 m1004 +photos/f-034-01 f034 f034 +photos/m-028-01 m028 m028 +photos/m-081-01 m081 m081 +photos/m-033-01 m033 m033 +photos/m1-009-01 m1009 m1009 +photos/f1-013-01 f1013 f1013 +photos/f-039-01 f039 f039 +photos/f-012-01 f012 f012 +photos/m1-032-01 m1032 m1032 +photos/f-005-01 f005 f005 +photos/f-041-01 f041 f041 +photos/m-036-01 m036 m036 +photos/m1-006-01 m1006 m1006 +photos/m-022-01 m022 m022 +photos/m-070-01 m070 m070 +photos/f-017-01 f017 f017 +photos/m-101-01 m101 m101 +photos/m-093-01 m093 m093 +photos/m-029-01 m029 m029 +photos/f1-009-01 f1009 f1009 +photos/m-091-01 m091 m091 +photos/f1-002-01 f1002 f1002 +photos/m-018-01 m018 m018 +photos/f-022-01 f022 f022 +photos/m-089-01 m089 m089 +photos/m-066-01 m066 m066 +photos/m1-007-01 m1007 m1007 +photos/m1-038-01 m1038 m1038 +photos/m-077-01 m077 m077 +photos/m-044-01 m044 m044 +photos/m-031-01 m031 m031 +photos/m-099-01 m099 m099 +photos/m1-026-01 m1026 m1026 +photos/m-095-01 m095 m095 +photos/m1-013-01 m1013 m1013 +photos/m-090-01 m090 m090 +photos/m1-037-01 m1037 m1037 +photos/m-030-01 m030 m030 +photos/f-009-01 f009 f009 +photos/f-037-01 f037 f037 +photos/f-019-01 f019 f019 +photos/f1-003-01 f1003 f1003 +photos/m1-016-01 m1016 m1016 +photos/m1-022-01 m1022 m1022 +photos/m-069-01 m069 m069 +photos/f1-008-01 f1008 f1008 +photos/f1-015-01 f1015 f1015 +photos/f1-012-01 f1012 f1012 +photos/m1-021-01 m1021 m1021 +photos/m-015-01 m015 m015 +photos/m-032-01 m032 m032 +photos/f-043-01 f043 f043 +photos/m-058-01 m058 m058 +photos/m-025-01 m025 m025 +photos/m-062-01 m062 m062 +photos/m1-002-01 m1002 m1002 +photos/f-011-01 f011 f011 +photos/m-050-01 m050 m050 +photos/m-074-01 m074 m074 +photos/m-009-01 m009 m009 +photos/m-039-01 m039 m039 +photos/f1-014-01 f1014 f1014 +photos/m-017-01 m017 m017 +photos/f-042-01 f042 f042 +photos/m-097-01 m097 m097 +photos/m1-024-01 m1024 m1024 +photos/f-028-01 f028 f028 +photos/m-076-01 m076 m076 diff --git a/bob/db/cuhk_cufs/lists_old/cuhk/eval/for_probes.lst b/bob/db/cuhk_cufs/lists_old/cuhk/eval/for_probes.lst new file mode 100644 index 0000000000000000000000000000000000000000..2672325b979970a478a72eb5c513b4a6c166b894 --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/cuhk/eval/for_probes.lst @@ -0,0 +1,75 @@ +sketches/F2-035-01-sz1 f035 +sketches/M2-008-01-sz1 m008 +sketches/m-082-01-sz1 m082 +sketches/m-096-01-sz1 m096 +sketches/m1-040-01-sz1 m1040 +sketches/m-078-01-sz1 m078 +sketches/m1-004-01-sz1 m1004 +sketches/F2-034-01-sz1 f034 +sketches/M2-028-01-sz1 m028 +sketches/m-081-01-sz1 m081 +sketches/M2-033-01-sz1 m033 +sketches/m1-009-01-sz1 m1009 +sketches/f1-013-01-sz1 f1013 +sketches/f-039-01-sz1 f039 +sketches/F2-012-01-sz1 f012 +sketches/m1-032-01-sz1 m1032 +sketches/F2-005-01-sz1 f005 +sketches/f-041-01-sz1 f041 +sketches/M2-036-01-sz1 m036 +sketches/m1-006-01-sz1 m1006 +sketches/M2-022-01-sz1 m022 +sketches/m-070-01-sz1 m070 +sketches/F2-017-01-sz1 f017 +sketches/m-101-01-sz1 m101 +sketches/m-093-01-sz1 m093 +sketches/M2-029-01-sz1 m029 +sketches/f1-009-01-sz1 f1009 +sketches/m-091-01-sz1 m091 +sketches/f1-002-01-sz1 f1002 +sketches/M2-018-01-sz1 m018 +sketches/F2-022-01-sz1 f022 +sketches/m-089-01-sz1 m089 +sketches/m-066-01-sz1 m066 +sketches/m1-007-01-sz1 m1007 +sketches/m1-038-01-sz1 m1038 +sketches/m-077-01-sz1 m077 +sketches/M2-044-01-sz1 m044 +sketches/M2-031-01-sz1 m031 +sketches/m-099-01-sz1 m099 +sketches/m1-026-01-sz1 m1026 +sketches/m-095-01-sz1 m095 +sketches/m1-013-01-sz1 m1013 +sketches/m-090-01-sz1 m090 +sketches/m1-037-01-sz1 m1037 +sketches/M2-030-01-sz1 m030 +sketches/F2-009-01-sz1 f009 +sketches/F2-037-01-sz1 f037 +sketches/F2-019-01-sz1 f019 +sketches/f1-003-01-sz1 f1003 +sketches/m1-016-01-sz1 m1016 +sketches/m1-022-01-sz1 m1022 +sketches/m-069-01-sz1 m069 +sketches/f1-008-01-sz1 f1008 +sketches/f1-015-01-sz1 f1015 +sketches/f1-012-01-sz1 f1012 +sketches/m1-021-01-sz1 m1021 +sketches/M2-015-01-sz1 m015 +sketches/M2-032-01-sz1 m032 +sketches/f-043-01-sz1 f043 +sketches/M2-058-01-sz1 m058 +sketches/M2-025-01-sz1 m025 +sketches/M2-062-01-sz1 m062 +sketches/m1-002-01-sz1 m1002 +sketches/F2-011-01-sz1 f011 +sketches/M2-050-01-sz1 m050 +sketches/m-074-01-sz1 m074 +sketches/M2-009-01-sz1 m009 +sketches/M2-039-01-sz1 m039 +sketches/f1-014-01-sz1 f1014 +sketches/M2-017-01-sz1 m017 +sketches/f-042-01-sz1 f042 +sketches/m-097-01-sz1 m097 +sketches/m1-024-01-sz1 m1024 +sketches/F2-028-01-sz1 f028 +sketches/m-076-01-sz1 m076 diff --git a/bob/db/cuhk_cufs/lists_old/cuhk/norm/train_world.lst b/bob/db/cuhk_cufs/lists_old/cuhk/norm/train_world.lst new file mode 100644 index 0000000000000000000000000000000000000000..04473e236cbc49c83adfdf90ecf7f97ff18399bc --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/cuhk/norm/train_world.lst @@ -0,0 +1,114 @@ +photos/m-059-01 m059 +sketches/M2-059-01-sz1 m059 +photos/m1-041-01 m1041 +sketches/m1-041-01-sz1 m1041 +photos/f1-007-01 f1007 +sketches/f1-007-01-sz1 f1007 +photos/m-023-01 m023 +sketches/M2-023-01-sz1 m023 +photos/m1-020-01 m1020 +sketches/m1-020-01-sz1 m1020 +photos/f1-004-01 f1004 +sketches/f1-004-01-sz1 f1004 +photos/m1-014-01 m1014 +sketches/m1-014-01-sz1 m1014 +photos/m1-027-01 m1027 +sketches/m1-027-01-sz1 m1027 +photos/m-021-01 m021 +sketches/M2-021-01-sz1 m021 +photos/m1-005-01 m1005 +sketches/m1-005-01-sz1 m1005 +photos/m-040-01 m040 +sketches/M2-040-01-sz1 m040 +photos/m1-029-01 m1029 +sketches/m1-029-01-sz1 m1029 +photos/f-032-01 f032 +sketches/F2-032-01-sz1 f032 +photos/m1-028-01 m1028 +sketches/m1-028-01-sz1 m1028 +photos/m-080-01 m080 +sketches/m-080-01-sz1 m080 +photos/m-086-01 m086 +sketches/m-086-01-sz1 m086 +photos/m1-003-01 m1003 +sketches/m1-003-01-sz1 m1003 +photos/m1-012-01 m1012 +sketches/m1-012-01-sz1 m1012 +photos/f1-006-01 f1006 +sketches/f1-006-01-sz1 f1006 +photos/f-020-01 f020 +sketches/F2-020-01-sz1 f020 +photos/m-094-01 m094 +sketches/m-094-01-sz1 m094 +photos/m-098-01 m098 +sketches/m-098-01-sz1 m098 +photos/m-092-01 m092 +sketches/m-092-01-sz1 m092 +photos/m-042-01 m042 +sketches/M2-042-01-sz1 m042 +photos/f-025-01 f025 +sketches/F2-025-01-sz1 f025 +photos/m-047-01 m047 +sketches/M2-047-01-sz1 m047 +photos/m-079-01 m079 +sketches/m-079-01-sz1 m079 +photos/f-024-01 f024 +sketches/F2-024-01-sz1 f024 +photos/m1-035-01 m1035 +sketches/m1-035-01-sz1 m1035 +photos/m1-025-01 m1025 +sketches/m1-025-01-sz1 m1025 +photos/m-060-01 m060 +sketches/M2-060-01-sz1 m060 +photos/f-016-01 f016 +sketches/F2-016-01-sz1 f016 +photos/m-019-01 m019 +sketches/M2-019-01-sz1 m019 +photos/f-014-01 f014 +sketches/F2-014-01-sz1 f014 +photos/m1-039-01 m1039 +sketches/m1-039-01-sz1 m1039 +photos/m1-030-01 m1030 +sketches/m1-030-01-sz1 m1030 +photos/m-038-01 m038 +sketches/M2-038-01-sz1 m038 +photos/m-083-01 m083 +sketches/m-083-01-sz1 m083 +photos/m1-036-01 m1036 +sketches/m1-036-01-sz1 m1036 +photos/m-085-01 m085 +sketches/m-085-01-sz1 m085 +photos/m-043-01 m043 +sketches/M2-043-01-sz1 m043 +photos/m-051-01 m051 +sketches/M2-051-01-sz1 m051 +photos/f-023-01 f023 +sketches/F2-023-01-sz1 f023 +photos/m1-019-01 m1019 +sketches/m1-019-01-sz1 m1019 +photos/m-063-01 m063 +sketches/m-063-01-sz1 m063 +photos/m-100-01 m100 +sketches/m-100-01-sz1 m100 +photos/f-026-01 f026 +sketches/F2-026-01-sz1 f026 +photos/m-024-01 m024 +sketches/M2-024-01-sz1 m024 +photos/m-075-01 m075 +sketches/m-075-01-sz1 m075 +photos/f1-011-01 f1011 +sketches/f1-011-01-sz1 f1011 +photos/f1-001-01 f1001 +sketches/f1-001-01-sz1 f1001 +photos/m-067-01 m067 +sketches/m-067-01-sz1 m067 +photos/m-061-01 m061 +sketches/M2-061-01-sz1 m061 +photos/m1-031-01 m1031 +sketches/m1-031-01-sz1 m1031 +photos/m-049-01 m049 +sketches/M2-049-01-sz1 m049 +photos/m-011-01 m011 +sketches/M2-011-01-sz1 m011 +photos/f-008-01 f008 +sketches/F2-008-01-sz1 f008 diff --git a/bob/db/cuhk_cufs/lists_old/generate_train_dev_eval.py b/bob/db/cuhk_cufs/lists_old/generate_train_dev_eval.py new file mode 100644 index 0000000000000000000000000000000000000000..d790a30e12a713ae775564a67b88b199d6ccd625 --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/generate_train_dev_eval.py @@ -0,0 +1,70 @@ +""" +This script is not part of the package, it is just for organize it. + +This script generates the train set, dev set and evaluation set for a given input file. + +Since in all protocols of this database we have only one pair per identity, we will define the number of identies as #lines/2 + +photo first, sketch after + +""" + +import numpy +numpy.random.seed(0) #Fixing the seed to reproduce the thins + +input_file = "all-cuhk.lst" +files_train = 57 +files_dev = 56 +files_eval = 75 +files = open(input_file).readlines() + +N = len(files)/2 +assert N == files_train + files_dev + files_eval + +indexes = numpy.array(range(N)) +numpy.random.shuffle(indexes) + + +def get_lines_from_file(files, line_number): + + text = "" + text += files[line_number] + text += files[line_number+1] + + return text + +#train set +i = 0 +train_text = "" +for j in range(files_train): + train_text += get_lines_from_file(files, indexes[i]*2) + i+=1 +open("train_world.lst","w").write(train_text) + + +#dev set +dev_models_text = "" +dev_probes_text = "" +for j in range(files_dev): + text = get_lines_from_file(files, indexes[i]*2) + dev_models_text += text.split("\n")[0] + " " + text.split("\n")[0].split(" ")[1] + "\n" + dev_probes_text += text.split("\n")[1] + "\n" + + i+=1 +open("for_models.lst","w").write(dev_models_text) +open("for_probes.lst","w").write(dev_probes_text) + + +#eval set +eval_models_text = "" +eval_probes_text = "" +for j in range(files_eval): + text = get_lines_from_file(files, indexes[i]*2) + eval_models_text += text.split("\n")[0] + " " + text.split("\n")[0].split(" ")[1] + "\n" + eval_probes_text += text.split("\n")[1] + "\n" + + i+=1 +open("eval_for_models.lst","w").write(eval_models_text) +open("eval_for_probes.lst","w").write(eval_probes_text) + + diff --git a/bob/db/cuhk_cufs/lists_old/organize_cuhk-protocol.py b/bob/db/cuhk_cufs/lists_old/organize_cuhk-protocol.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfdd8c35d86152e6f4126201b26eecbc1ea1a3b --- /dev/null +++ b/bob/db/cuhk_cufs/lists_old/organize_cuhk-protocol.py @@ -0,0 +1,79 @@ +""" +This script is not part of the package, it is just for organize it. +""" + +import os + +HTML_OUTPUT = False + + +def search_photo2sketch(photo_file_name, sketches): + + prefix = photo_file_name.split("-")[0] + id = photo_file_name.split("-")[1] + + for s in sketches: + + prefix_s = s.split("-")[0] + id_s = s.split("-")[1] + + #if id=="040" and id_s=="040" and id==id_s: + #import ipdb; ipdb.set_trace(); +# print prefix + " -- " + prefix_s + + if prefix=="f" and prefix_s=="F2" and id == id_s: + return s + elif prefix=="f" and prefix_s=="f" and id == id_s: + return s + elif prefix=="f1" and prefix_s=="f1" and id == id_s: + return s + elif prefix=="m" and (prefix_s=="m" or prefix_s=="M2") and id == id_s: + return s + elif prefix=="m1" and prefix_s=="m1"and id == id_s: + return s + return "" + + +input_dir = "/idiap/resource/database/CUHK-CUFS/CUHK-student-dataset/" +sketches_dir = os.path.join(input_dir,"sketches") +photos_dir = os.path.join(input_dir,"photos") + +sketches = open("sketches").readlines() +photos = open("photos").readlines() + + +if not HTML_OUTPUT: + + text = "" + + for p in photos: + sketch_file = search_photo2sketch(p, sketches) + + prefix = p.split("-")[0] + id = p.split("-")[1] + + text += os.path.join("photos",p.rstrip("*\n")) + " " + prefix + id + "\n" + text += os.path.join("sketches",sketch_file.rstrip("*\n")) + " " + prefix + id + "\n" + + open("all.lst",'w').write(text) + + +else: + + html = "<html><body>" + html += "<table>" + + for p in photos: + + html += "<tr>" + + html += "<td><img src='file://"+ os.path.join(photos_dir, p.rstrip("*\n")) +"'></td>" + sketch_file = search_photo2sketch(p, sketches) + html += "<td><img src='"+ os.path.join(sketches_dir, sketch_file.rstrip("*\n")) +"'></td>" + + html += "</tr>\n" + + html += "</table>" + html += "</body></html>" + + open("output.html",'w').write(html) diff --git a/bob/db/cuhk/models.py b/bob/db/cuhk_cufs/models.py similarity index 100% rename from bob/db/cuhk/models.py rename to bob/db/cuhk_cufs/models.py diff --git a/bob/db/cuhk/query.py b/bob/db/cuhk_cufs/query.py similarity index 80% rename from bob/db/cuhk/query.py rename to bob/db/cuhk_cufs/query.py index f88a4f733bfdbd43b3493e4a715726f501b3336d..4943c3d540fa3962eefa33998cd56b3313d51294 100644 --- a/bob/db/cuhk/query.py +++ b/bob/db/cuhk_cufs/query.py @@ -31,7 +31,7 @@ SQLITE_FILE = Interface().files()[0] class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.utils.ZTDatabase): - """Wrapper class for the CUHK-CUFS database for Heterogeneous face recognition recognition (http://mmlab.ie.cuhk.edu.hk/archive/facesketch.html). + """Wrapper class for the CUHK-CUFS database for Heterogeneous face recognition recognition (http://mmlab.ie.cuhk_cufs.edu.hk/archive/facesketch.html). """ @@ -64,18 +64,18 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti raise ValueError("Please, select only one of the following protocols {0}".format(protocols)) #Querying - query = self.query(bob.db.cuhk.File, bob.db.cuhk.Protocol_File_Association).join(bob.db.cuhk.Protocol_File_Association).join(bob.db.cuhk.Client) + query = self.query(bob.db.cuhk_cufs.File, bob.db.cuhk_cufs.Protocol_File_Association).join(bob.db.cuhk_cufs.Protocol_File_Association).join(bob.db.cuhk_cufs.Client) #filtering - query = query.filter(bob.db.cuhk.Protocol_File_Association.group.in_(groups)) - query = query.filter(bob.db.cuhk.Protocol_File_Association.protocol.in_(protocols)) - query = query.filter(bob.db.cuhk.Protocol_File_Association.purpose.in_(purposes)) + query = query.filter(bob.db.cuhk_cufs.Protocol_File_Association.group.in_(groups)) + query = query.filter(bob.db.cuhk_cufs.Protocol_File_Association.protocol.in_(protocols)) + query = query.filter(bob.db.cuhk_cufs.Protocol_File_Association.purpose.in_(purposes)) if model_ids is not None: if type(model_ids) is not list and type(model_ids) is not tuple: model_ids = [model_ids] - query = query.filter(bob.db.cuhk.Client.id.in_(model_ids)) + query = query.filter(bob.db.cuhk_cufs.Client.id.in_(model_ids)) raw_files = query.all() files = [] @@ -99,11 +99,11 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti raise ValueError("Please, select only one of the following protocols {0}".format(protocols)) #Querying - query = self.query(bob.db.cuhk.Client).join(bob.db.cuhk.File).join(bob.db.cuhk.Protocol_File_Association) + query = self.query(bob.db.cuhk_cufs.Client).join(bob.db.cuhk_cufs.File).join(bob.db.cuhk_cufs.Protocol_File_Association) #filtering - query = query.filter(bob.db.cuhk.Protocol_File_Association.group.in_(groups)) - query = query.filter(bob.db.cuhk.Protocol_File_Association.protocol.in_(protocols)) + query = query.filter(bob.db.cuhk_cufs.Protocol_File_Association.group.in_(groups)) + query = query.filter(bob.db.cuhk_cufs.Protocol_File_Association.protocol.in_(protocols)) return query.all() diff --git a/bob/db/cuhk_cufs/test.py b/bob/db/cuhk_cufs/test.py new file mode 100644 index 0000000000000000000000000000000000000000..dfc816071706dfc35db6f24e48edceb7a95cbca5 --- /dev/null +++ b/bob/db/cuhk_cufs/test.py @@ -0,0 +1,340 @@ +#!/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_cufs +#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_cufs.Database().protocols() + for p in possible_protocols: + assert p in PROTOCOLS + + #testing purposes + possible_purposes = bob.db.cuhk_cufs.Database().purposes() + for p in possible_purposes: + assert p in PURPOSES + + #testing GROUPS + possible_groups = bob.db.cuhk_cufs.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_cufs.Database().objects(protocol="cuhk_p2s")) == cuhk + assert len(bob.db.cuhk_cufs.Database().objects(protocol="cuhk_s2p")) == cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(protocol="arface_p2s")) == arface + assert len(bob.db.cuhk_cufs.Database().objects(protocol="arface_s2p")) == arface + + assert len(bob.db.cuhk_cufs.Database().objects(protocol="xm2vts_p2s")) == xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(protocol="xm2vts_s2p")) == xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(protocol="all-mixed_p2s")) == all_mixed + assert len(bob.db.cuhk_cufs.Database().objects(protocol="all-mixed_s2p")) == all_mixed + + assert len(bob.db.cuhk_cufs.Database().objects(protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface + assert len(bob.db.cuhk_cufs.Database().objects(protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface + + assert len(bob.db.cuhk_cufs.Database().objects(protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk + assert len(bob.db.cuhk_cufs.Database().objects(protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface + assert len(bob.db.cuhk_cufs.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_cufs.Database().objects(groups='world', protocol="cuhk_p2s")) == cuhk + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="cuhk_s2p")) == cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="arface_p2s")) == arface + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="arface_s2p")) == arface + + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="xm2vts_p2s")) == xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="xm2vts_s2p")) == xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="all-mixed_p2s")) == all_mixed + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="all-mixed_s2p")) == all_mixed + + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface + + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='world', protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface + assert len(bob.db.cuhk_cufs.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_cufs.Database().objects(groups='dev', protocol="cuhk_p2s")) == cuhk + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="cuhk_s2p")) == cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="arface_p2s")) == arface + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="arface_s2p")) == arface + + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="xm2vts_p2s")) == xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="xm2vts_s2p")) == xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="all-mixed_p2s")) == all_mixed + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="all-mixed_s2p")) == all_mixed + + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface + + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='dev', protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface + assert len(bob.db.cuhk_cufs.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_cufs.Database().objects(groups='eval', protocol="cuhk_p2s")) == cuhk + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="cuhk_s2p")) == cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="arface_p2s")) == arface + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="arface_s2p")) == arface + + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="xm2vts_p2s")) == xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="xm2vts_s2p")) == xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="all-mixed_p2s")) == all_mixed + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="all-mixed_s2p")) == all_mixed + + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface + + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(groups='eval', protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface + assert len(bob.db.cuhk_cufs.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_cufs.Database().objects(purposes='enroll', groups='dev', protocol="cuhk_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk_p2s"))== cuhk + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="cuhk_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk_s2p")) == cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="arface_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface_p2s")) == arface + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="arface_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface_s2p")) == arface + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="xm2vts_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="xm2vts_p2s")) == xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="xm2vts_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="xm2vts_s2p")) == xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="all-mixed_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="all-mixed_p2s")) == all_mixed + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="all-mixed_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="all-mixed_s2p")) == all_mixed + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="cuhk-arface-xm2vts_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk-arface-xm2vts_p2s")) == cuhk_arface_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="cuhk-arface-xm2vts_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk-arface-xm2vts_s2p")) == cuhk_arface_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="cuhk-xm2vts-arface_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk-xm2vts-arface_p2s")) == cuhk_xm2vts_arface + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="cuhk-xm2vts-arface_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk-xm2vts-arface_s2p")) == cuhk_xm2vts_arface + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="arface-xm2vts-cuhk_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface-xm2vts-cuhk_p2s")) == arface_xm2vts_cuhk + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="arface-xm2vts-cuhk_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface-xm2vts-cuhk_s2p")) == arface_xm2vts_cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="arface-cuhk-xm2vts_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface-cuhk-xm2vts_p2s")) == arface_cuhk_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="arface-cuhk-xm2vts_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface-cuhk-xm2vts_s2p")) == arface_cuhk_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="xm2vts-cuhk-arface_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="xm2vts-cuhk-arface_p2s")) == xm2vts_cuhk_arface + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='dev', protocol="xm2vts-cuhk-arface_s2p")) == len(bob.db.cuhk_cufs.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_cufs.Database().objects(purposes='enroll', groups='eval', protocol="cuhk_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk_p2s", groups='eval'))== cuhk + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="cuhk_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk_s2p", groups='eval')) == cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="arface_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface_p2s", groups='eval')) == arface + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="arface_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface_s2p", groups='eval')) == arface + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="xm2vts_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="xm2vts_p2s", groups='eval')) == xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="xm2vts_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="xm2vts_s2p", groups='eval')) == xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="all-mixed_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="all-mixed_p2s", groups='eval')) == all_mixed + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="all-mixed_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="all-mixed_s2p", groups='eval')) == all_mixed + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="cuhk-arface-xm2vts_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk-arface-xm2vts_p2s", groups='eval')) == cuhk_arface_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="cuhk-arface-xm2vts_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk-arface-xm2vts_s2p", groups='eval')) == cuhk_arface_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="cuhk-xm2vts-arface_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk-xm2vts-arface_p2s", groups='eval')) == cuhk_xm2vts_arface + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="cuhk-xm2vts-arface_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="cuhk-xm2vts-arface_s2p", groups='eval')) == cuhk_xm2vts_arface + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="arface-xm2vts-cuhk_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface-xm2vts-cuhk_p2s", groups='eval')) == arface_xm2vts_cuhk + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="arface-xm2vts-cuhk_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface-xm2vts-cuhk_s2p", groups='eval')) == arface_xm2vts_cuhk + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="arface-cuhk-xm2vts_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface-cuhk-xm2vts_p2s", groups='eval')) == arface_cuhk_xm2vts + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="arface-cuhk-xm2vts_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="arface-cuhk-xm2vts_s2p", groups='eval')) == arface_cuhk_xm2vts + + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="xm2vts-cuhk-arface_p2s")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="xm2vts-cuhk-arface_p2s", groups='eval')) == xm2vts_cuhk_arface + assert len(bob.db.cuhk_cufs.Database().objects(purposes='enroll', groups='eval', protocol="xm2vts-cuhk-arface_s2p")) == len(bob.db.cuhk_cufs.Database().enroll_files(protocol="xm2vts-cuhk-arface_s2p", groups='eval')) == xm2vts_cuhk_arface + + +def test08_strings(): + + db = bob.db.cuhk_cufs.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_cufs.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 + + + + + + diff --git a/bob/db/cuhk/utils.py b/bob/db/cuhk_cufs/utils.py similarity index 80% rename from bob/db/cuhk/utils.py rename to bob/db/cuhk_cufs/utils.py index f763a714f3eb167d4274ec39c9f6be08e2d436df..59fc3167f23affc212564ee88a4bb7f61090b75d 100644 --- a/bob/db/cuhk/utils.py +++ b/bob/db/cuhk_cufs/utils.py @@ -42,8 +42,8 @@ class ARFACEWrapper(): """ def __init__(self, - photo_file_name=os.path.join(os.path.curdir,"bob","db","cuhk","data","AR_file_names_of_photos.txt"), - sketch_file_name=os.path.join(os.path.curdir,"bob","db","cuhk","data","AR_file_names_of_sketches.txt") + photo_file_name=os.path.join(os.path.curdir,"bob","db","cuhk_cufs","data","AR_file_names_of_photos.txt"), + sketch_file_name=os.path.join(os.path.curdir,"bob","db","cuhk_cufs","data","AR_file_names_of_sketches.txt") ): self.m_photo_file_name = photo_file_name @@ -68,24 +68,24 @@ class ARFACEWrapper(): def get_files_from_group(self, group=""): """ - Get the bob.db.cuhk.File for a given group (world, dev or eval). + Get the bob.db.cuhk_cufs.File for a given group (world, dev or eval). Follow bellow the steps for this selection. 1 - Select the bob.db.arface.Client for a given group - 2 - Search the correspondent bob.db.cuhk.File joint with bob.db.cuhk.Client using the original_client_id as a search criteria. + 2 - Search the correspondent bob.db.cuhk_cufs.File joint with bob.db.cuhk_cufs.Client using the original_client_id as a search criteria. 3 - Accumulate the result of the search. """ arface = bob.db.arface.Database() - cuhk = bob.db.cuhk.Database() + cuhk = bob.db.cuhk_cufs.Database() #Getting the clients from ARFACE clients = arface.query(bob.db.arface.Client).filter(bob.db.arface.Client.sgroup==group) - #Getting the correspondent files from bob.db.cuhk + #Getting the correspondent files from bob.db.cuhk_cufs files = [] for c in clients: - cuhk_files = cuhk.query(bob.db.cuhk.File).join(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_id==c.id) + cuhk_files = cuhk.query(bob.db.cuhk_cufs.File).join(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_id==c.id) for f in cuhk_files: files.append(f) @@ -97,10 +97,10 @@ class ARFACEWrapper(): Get the annotation objects """ - db = bob.db.cuhk.Database() + db = bob.db.cuhk_cufs.Database() annotations = [] - for o in db.query(bob.db.cuhk.File).join(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_database=="arface"): + for o in db.query(bob.db.cuhk_cufs.File).join(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_database=="arface"): #making the path if(o.modality=="sketch"): path = os.path.join(annotation_dir, o.path) + annotation_extension @@ -112,7 +112,7 @@ class ARFACEWrapper(): index = 0 for a in original_annotations: - annotations.append(bob.db.cuhk.Annotation(o.id, + annotations.append(bob.db.cuhk_cufs.Annotation(o.id, a[0], a[1], index = index @@ -132,7 +132,7 @@ class ARFACEWrapper(): modality: Modality (photo | sketch) - clients: The list of bob.db.cuhk.clients + clients: The list of bob.db.cuhk_cufs.clients """ @@ -150,10 +150,10 @@ class ARFACEWrapper(): original_files = db.files(ids=original_files) for f in original_files: #self, id, image_name, client_id, modality - client = bob.db.cuhk.Database().query(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_id == f.id[0:5]) + client = bob.db.cuhk_cufs.Database().query(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_id == f.id[0:5]) assert client.count() == 1 client = client[0] - files.append(bob.db.cuhk.File(id = 0, + files.append(bob.db.cuhk_cufs.File(id = 0, client_id=client.id, image_name=f.path, modality = 'photo' @@ -167,12 +167,12 @@ class ARFACEWrapper(): for f in raw_files: f = f.rstrip("\n") original_client_id = f[0] + f[2:6] #the original client id is [m|w]-number - client = bob.db.cuhk.Database().query(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_id == original_client_id.lower()) #GEtting the client_id + client = bob.db.cuhk_cufs.Database().query(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_id == original_client_id.lower()) #GEtting the client_id assert client.count() == 1 client = client[0] f = os.path.join("ARFACE","sketch",f) - files.append(bob.db.cuhk.File(id = 0, + files.append(bob.db.cuhk_cufs.File(id = 0, client_id = client.id, image_name = f, modality = 'sketch' @@ -189,8 +189,8 @@ class XM2VTSWrapper(): """ def __init__(self, - photo_file_name=os.path.join(os.path.curdir,"bob","db","cuhk","data","XM2VTS_file_names_of_photos.txt"), - sketch_file_name=os.path.join(os.path.curdir,"bob","db","cuhk","data","XM2VTS_file_names_of_sketches.txt") + photo_file_name=os.path.join(os.path.curdir,"bob","db","cuhk_cufs","data","XM2VTS_file_names_of_photos.txt"), + sketch_file_name=os.path.join(os.path.curdir,"bob","db","cuhk_cufs","data","XM2VTS_file_names_of_sketches.txt") ): self.m_photo_file_name = photo_file_name @@ -225,8 +225,8 @@ class XM2VTSWrapper(): indexes = [273, 241, 285, 256, 173, 193, 107, 55, 53, 143, 163, 63, 13, 113, 258, 271, 134, 17, 20, 227, 203, 96, 66, 112, 77, 237, 42, 61, 272, 161, 209, 206, 195, 140, 150, 294, 152, 136, 188, 232, 21, 75, 141, 25, 249, 269, 70, 217, 251, 29, 153, 83, 185, 94, 116, 265, 177, 38, 156, 191, 118, 121, 204, 100, 255, 286, 78, 260, 282, 33, 242, 200, 91, 224, 137, 180, 65, 12, 3, 151, 154, 1, 290, 198, 167, 212, 72, 133, 144, 57, 0, 211, 48, 292, 213, 277, 52, 223, 115, 230, 49, 4, 291, 214, 18, 71, 146, 289, 250, 268, 201, 170, 11, 178, 2, 155, 264, 64, 287, 14, 110, 30, 19, 149, 68, 183, 44, 60, 181, 283, 86, 139, 81, 126, 202, 120, 10, 9, 164, 218, 43, 148, 105, 186, 225, 93, 184, 50, 257, 132, 254, 27, 108, 106, 69, 252, 138, 122, 196, 175, 228, 7, 168, 135, 15, 231, 182, 280, 147, 54, 261, 79, 281, 125, 142, 101, 259, 41, 187, 16, 275, 248, 179, 169, 89, 245, 26, 73, 199, 90, 128, 236, 40, 166, 262, 84, 32, 97, 92, 174, 284, 37, 36, 111, 82, 104, 58, 98, 235, 215, 220, 130, 85, 216, 205, 274, 22, 244, 129, 247, 6, 240, 279, 5, 109, 31, 74, 127, 95, 117, 210, 165, 80, 59, 114, 194, 238, 207, 239, 267, 159, 243, 131, 171, 67, 222, 8, 47, 45, 99, 123, 229, 293, 270, 253, 46, 162, 263, 102, 76, 88, 28, 158, 278, 62, 246, 176, 124, 234, 276, 87, 24, 157, 119, 197, 190, 35, 34, 160, 56, 266, 172, 39, 233, 221, 192, 288, 23, 226, 219, 189, 208, 145, 103, 51] #Fetching the clients - cuhk = bob.db.cuhk.Database() - all_clients = numpy.array(cuhk.query(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_database=="xm2vts").order_by(bob.db.cuhk.Client.original_id).all()) + cuhk = bob.db.cuhk_cufs.Database() + all_clients = numpy.array(cuhk.query(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_database=="xm2vts").order_by(bob.db.cuhk_cufs.Client.original_id).all()) data_training = 118 data_dev = 88 @@ -244,10 +244,10 @@ class XM2VTSWrapper(): clients = all_clients[indexes[offset:offset+data_eval]] - #Fetching the correspondent files from bob.db.cuhk + #Fetching the correspondent files from bob.db.cuhk_cufs files = [] for c in clients: - cuhk_files = cuhk.query(bob.db.cuhk.File).join(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.id==c.id) + cuhk_files = cuhk.query(bob.db.cuhk_cufs.File).join(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.id==c.id) for f in cuhk_files: files.append(f) @@ -258,7 +258,7 @@ class XM2VTSWrapper(): """ TODO: THE BOB.DB.XM2VTS PROTOCOLS ARE BIASED - Get the bob.db.cuhk.File for a given group (world, dev or eval). + Get the bob.db.cuhk_cufs.File for a given group (world, dev or eval). There is no way to do it using ORM so I did a powerful SQL query in the XM2VTS. @@ -277,7 +277,7 @@ class XM2VTSWrapper(): """ from sqlalchemy import text xm2vts = bob.db.xm2vts.Database() - cuhk = bob.db.cuhk.Database() + cuhk = bob.db.cuhk_cufs.Database() #Getting the clients from ARFACE @@ -291,10 +291,10 @@ class XM2VTSWrapper(): clients = xm2vts.query(bob.db.xm2vts.Client).from_statement(text(sql)).all() - #Getting the correspondent files from bob.db.cuhk + #Getting the correspondent files from bob.db.cuhk_cufs files = [] for c in clients: - cuhk_files = cuhk.query(bob.db.cuhk.File).join(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_id==c.id) + cuhk_files = cuhk.query(bob.db.cuhk_cufs.File).join(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_id==c.id) #print "{0} = {1}".format(c.id, cuhk_files.count()) for f in cuhk_files: files.append(f) @@ -309,10 +309,10 @@ class XM2VTSWrapper(): Get the annotation objects """ - db = bob.db.cuhk.Database() + db = bob.db.cuhk_cufs.Database() annotations = [] - for o in db.query(bob.db.cuhk.File).join(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_database=="xm2vts"): + for o in db.query(bob.db.cuhk_cufs.File).join(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_database=="xm2vts"): #making the path if(o.modality=="sketch"): path = os.path.join(annotation_dir, o.path) + annotation_extension @@ -325,7 +325,7 @@ class XM2VTSWrapper(): index = 0 for a in original_annotations: - annotations.append(bob.db.cuhk.Annotation(o.id, + annotations.append(bob.db.cuhk_cufs.Annotation(o.id, a[0], a[1], index = index @@ -347,7 +347,7 @@ class XM2VTSWrapper(): modality: Modality (photo | sketch) - clients: The list of bob.db.cuhk.clients + clients: The list of bob.db.cuhk_cufs.clients """ @@ -368,11 +368,11 @@ class XM2VTSWrapper(): f_obj = query[0] #getting the CUHK-CUFS file - client = bob.db.cuhk.Database().query(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_id == f[0:3]) + client = bob.db.cuhk_cufs.Database().query(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_id == f[0:3]) assert client.count() == 1 client = client[0] - files.append(bob.db.cuhk.File(id = 0, + files.append(bob.db.cuhk_cufs.File(id = 0, client_id=client.id, image_name=f_obj.path, modality = 'photo' @@ -386,12 +386,12 @@ class XM2VTSWrapper(): for f in raw_files: f = f.rstrip("\n") original_client_id = str(int(f[0:3])) - client = bob.db.cuhk.Database().query(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_id == original_client_id) + client = bob.db.cuhk_cufs.Database().query(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_id == original_client_id) assert client.count() == 1 client = client[0] f = os.path.join("xm2vts","sketch",f) - files.append(bob.db.cuhk.File(id = 0, + files.append(bob.db.cuhk_cufs.File(id = 0, client_id = client.id, image_name = f, modality = 'sketch' @@ -410,7 +410,7 @@ class CUHKWrapper(): """ def __init__(self, - file_name=os.path.join(os.path.curdir,"bob","db","cuhk","data","all-cuhk.txt"), + file_name=os.path.join(os.path.curdir,"bob","db","cuhk_cufs","data","all-cuhk.txt"), ): self.m_file_name = file_name @@ -438,10 +438,10 @@ class CUHKWrapper(): Get the annotation objects """ - db = bob.db.cuhk.Database() + db = bob.db.cuhk_cufs.Database() annotations = [] - for o in db.query(bob.db.cuhk.File).join(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_database=="cuhk"): + for o in db.query(bob.db.cuhk_cufs.File).join(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_database=="cuhk"): #making the path path = os.path.join(annotation_dir, o.path) + annotation_extension @@ -449,7 +449,7 @@ class CUHKWrapper(): original_annotations = read_annotations(path) index = 0 for a in original_annotations: - annotations.append(bob.db.cuhk.Annotation(o.id, + annotations.append(bob.db.cuhk_cufs.Annotation(o.id, a[0], a[1], index = index @@ -473,8 +473,8 @@ class CUHKWrapper(): indexes = [152, 70, 150, 120, 181, 64, 16, 66, 154, 1, 84, 35, 179, 105, 49, 159, 128, 14, 103, 157, 18, 148, 88, 134, 147, 72, 62, 110, 20, 27, 30, 187, 50, 117, 83, 71, 81, 61, 185, 85, 2, 145, 138, 45, 129, 151, 96, 132, 146, 87, 156, 173, 73, 38, 125, 69, 82, 34, 116, 102, 136, 91, 7, 143, 109, 112, 115, 63, 33, 165, 104, 170, 76, 36, 114, 5, 142, 90, 60, 40, 93, 67, 180, 77, 106, 130, 135, 124, 118, 6, 39, 97, 121, 4, 74, 86, 57, 24, 65, 167, 184, 163, 47, 169, 94, 8, 58, 126, 166, 15, 172, 11, 89, 162, 42, 98, 22, 133, 78, 175, 0, 160, 92, 37, 161, 17, 26, 122, 137, 164, 99, 149, 32, 95, 144, 46, 155, 168, 48, 182, 23, 80, 10, 140, 9, 55, 29, 113, 12, 54, 158, 52, 41, 119, 183, 25, 131, 107, 176, 31, 111, 108, 123, 79, 153, 178, 139, 51, 13, 177, 141, 171, 101, 3, 43, 68, 56, 21, 75, 28, 53, 44, 19, 174, 100, 127, 186, 59] #Fetching the clients - cuhk = bob.db.cuhk.Database() - all_clients = numpy.array(cuhk.query(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_database=="cuhk").order_by(bob.db.cuhk.Client.id).all()) + cuhk = bob.db.cuhk_cufs.Database() + all_clients = numpy.array(cuhk.query(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_database=="cuhk").order_by(bob.db.cuhk_cufs.Client.id).all()) data_training = 75 data_dev = 56 @@ -491,10 +491,10 @@ class CUHKWrapper(): offset = data_training + data_dev clients = all_clients[indexes[offset:offset+data_eval]] - #Fetching the correspondent files from bob.db.cuhk + #Fetching the correspondent files from bob.db.cuhk_cufs files = [] for c in clients: - cuhk_files = cuhk.query(bob.db.cuhk.File).join(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.id==c.id) + cuhk_files = cuhk.query(bob.db.cuhk_cufs.File).join(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.id==c.id) for f in cuhk_files: files.append(f) @@ -515,11 +515,11 @@ class CUHKWrapper(): image_name = d.split(" ")[0] modality = 'sketch' if (image_name.find('sketch')>-1) else 'photo' - client = bob.db.cuhk.Database().query(bob.db.cuhk.Client).filter(bob.db.cuhk.Client.original_id == original_client_id) + client = bob.db.cuhk_cufs.Database().query(bob.db.cuhk_cufs.Client).filter(bob.db.cuhk_cufs.Client.original_id == original_client_id) assert client.count() == 1 client = client[0] - files.append(bob.db.cuhk.File(id = 0, + files.append(bob.db.cuhk_cufs.File(id = 0, client_id = client.id, image_name = image_name, modality = modality diff --git a/buildout.cfg b/buildout.cfg index b9e3387222f330025c67afe6019c226afcd63bb5..94d17f0b5dc419e0fe85b8cb447b749ebeeffcb7 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -4,7 +4,7 @@ [buildout] parts = scripts -eggs = bob.db.cuhk +eggs = bob.db.cuhk_cufs extensions = bob.buildout mr.developer auto-checkout = * diff --git a/setup.py b/setup.py index ddf42972d2539bed2983fcf1d82eb664e09dc536..a085dab5bd3d7b770111217bfdfd274ccd2e9491 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ from setuptools import setup, find_packages setup( - name='bob.db.cuhk', + name='bob.db.cuhk_cufs', version='0.0.0a1', description='CUHK Face Sketch Database (CUFS)', url='', @@ -50,7 +50,7 @@ setup( entry_points = { # declare database to bob 'bob.db': [ - 'cuhk = bob.db.cuhk.driver:Interface', + 'cuhk_cufs = bob.db.cuhk_cufs.driver:Interface', ], },