Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.face
Commits
df97b7f6
Commit
df97b7f6
authored
Jun 29, 2015
by
Manuel Günther
Browse files
Merge branch 'master' of github.com:bioidiap/bob.bio.face
parents
2603ceb7
385eafc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/face/test/test_databases.py
View file @
df97b7f6
...
...
@@ -68,114 +68,116 @@ def _check_annotations(database):
def
test_arface
():
database
=
bob
.
bio
.
base
.
load_resource
(
'arface'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'arface'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database
(
database
,
groups
=
(
'dev'
,
'eval'
))
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
def
test_atnt
():
_check_database
(
bob
.
bio
.
base
.
load_resource
(
'atnt'
,
'database'
))
_check_database
(
bob
.
bio
.
base
.
load_resource
(
'atnt'
,
'database'
,
preferred_extension
=
'bob.bio.face'
))
def
test_banca
():
database
=
bob
.
bio
.
base
.
load_resource
(
'banca'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'banca'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database_zt
(
database
)
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not be queried; probably the db.sql3 file is missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
def
test_caspeal
():
database
=
bob
.
bio
.
base
.
load_resource
(
'caspeal'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'caspeal'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database
(
database
)
_check_database
(
database
,
protocol
=
'aging'
)
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
def
test_frgc
():
import
xml.sax
database
=
bob
.
bio
.
base
.
load_resource
(
'frgc'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'frgc'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database
(
database
,
models_depend
=
True
)
_check_database
(
database
,
protocol
=
'2.0.2'
,
models_depend
=
True
)
_check_annotations
(
database
)
except
xml
.
sax
.
SAXException
as
e
:
raise
SkipTest
(
"The database could not be opened, probably the original directory is wrong. Here is the
value
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not be opened, probably the original directory is wrong. Here is the error: '%s'"
%
e
)
def
test_gbu
():
database
=
bob
.
bio
.
base
.
load_resource
(
'gbu'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'gbu'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database
(
database
,
models_depend
=
True
)
_check_database
(
database
,
protocol
=
'Bad'
,
models_depend
=
True
)
_check_database
(
database
,
protocol
=
'Ugly'
,
models_depend
=
True
)
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
def
test_lfw
():
database
=
bob
.
bio
.
base
.
load_resource
(
'lfw-restricted'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'lfw-restricted'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database
(
database
,
training_depends
=
True
,
models_depend
=
True
)
_check_database
(
database
,
groups
=
(
'dev'
,
'eval'
),
protocol
=
'fold1'
,
training_depends
=
True
,
models_depend
=
True
)
_check_database
(
bob
.
bio
.
base
.
load_resource
(
'lfw-unrestricted'
,
'database'
),
training_depends
=
True
,
models_depend
=
True
)
_check_database
(
bob
.
bio
.
base
.
load_resource
(
'lfw-unrestricted'
,
'database'
,
preferred_extension
=
'bob.bio.face'
),
training_depends
=
True
,
models_depend
=
True
)
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
def
test_mobio
():
database
=
bob
.
bio
.
base
.
load_resource
(
'mobio-image'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'mobio-image'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database_zt
(
database
,
models_depend
=
True
)
_check_database_zt
(
database
,
protocol
=
'female'
,
models_depend
=
True
)
_check_database_zt
(
bob
.
bio
.
base
.
load_resource
(
'mobio-male'
,
'database'
),
models_depend
=
True
)
_check_database_zt
(
bob
.
bio
.
base
.
load_resource
(
'mobio-female'
,
'database'
),
models_depend
=
True
)
_check_database_zt
(
bob
.
bio
.
base
.
load_resource
(
'mobio-male'
,
'database'
,
preferred_extension
=
'bob.bio.face'
),
models_depend
=
True
)
_check_database_zt
(
bob
.
bio
.
base
.
load_resource
(
'mobio-female'
,
'database'
,
preferred_extension
=
'bob.bio.face'
),
models_depend
=
True
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not be queried; probably the db.sql3 file is missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
try
:
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The annotations could not be queried; probably the annotation files are missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The annotations could not be queried; probably the annotation files are missing. Here is the error: '%s'"
%
e
)
def
test_multipie
():
database
=
bob
.
bio
.
base
.
load_resource
(
'multipie'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'multipie'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database_zt
(
database
,
training_depends
=
True
)
_check_database_zt
(
bob
.
bio
.
base
.
load_resource
(
'multipie-pose'
,
'database'
),
training_depends
=
True
)
_check_database_zt
(
bob
.
bio
.
base
.
load_resource
(
'multipie-pose'
,
'database'
,
preferred_extension
=
'bob.bio.face'
),
training_depends
=
True
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the import error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
except
ValueError
as
e
:
raise
SkipTest
(
"The database could not queried; probably the protocol is missing inside the db.sql3 file. Here is the error: '%s'"
%
e
)
try
:
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The annotations could not be queried; probably the annotation files are missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The annotations could not be queried; probably the annotation files are missing. Here is the error: '%s'"
%
e
)
def
test_scface
():
database
=
bob
.
bio
.
base
.
load_resource
(
'scface'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'scface'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database_zt
(
database
)
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not be queried; probably the db.sql3 file is missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
def
test_xm2vts
():
database
=
bob
.
bio
.
base
.
load_resource
(
'xm2vts'
,
'database'
)
database
=
bob
.
bio
.
base
.
load_resource
(
'xm2vts'
,
'database'
,
preferred_extension
=
'bob.bio.face'
)
try
:
_check_database
(
database
,
groups
=
(
'dev'
,
'eval'
))
_check_database
(
database
,
groups
=
(
'dev'
,
'eval'
),
protocol
=
'darkened-lp1'
)
_check_annotations
(
database
)
except
IOError
as
e
:
raise
SkipTest
(
"The database could not be queried; probably the db.sql3 file is missing. Here is the
import
error: '%s'"
%
e
)
raise
SkipTest
(
"The database could not be queried; probably the db.sql3 file is missing. Here is the error: '%s'"
%
e
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment