Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.bio.face
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.bio.face
Commits
83c989e7
Commit
83c989e7
authored
Dec 22, 2020
by
Tiago de Freitas Pereira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes the database tests so it flawlessly passes in [mac] builds
parent
bf6eb731
Pipeline
#46782
passed with stage
in 39 minutes and 34 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
28 deletions
+66
-28
bob/bio/face/database/meds.py
bob/bio/face/database/meds.py
+10
-13
bob/bio/face/database/mobio.py
bob/bio/face/database/mobio.py
+8
-7
bob/bio/face/database/morph.py
bob/bio/face/database/morph.py
+8
-4
bob/bio/face/database/multipie.py
bob/bio/face/database/multipie.py
+8
-4
bob/bio/face/test/test_databases.py
bob/bio/face/test/test_databases.py
+32
-0
No files found.
bob/bio/face/database/meds.py
View file @
83c989e7
...
...
@@ -21,13 +21,6 @@ from sklearn.pipeline import make_pipeline
import
os
cache_subdir
=
"datasets"
filename
=
"meds.tar.gz"
dataset_protocol_path
=
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
"bob_data"
,
cache_subdir
,
filename
)
class
MEDSDatabase
(
CSVDatasetZTNorm
):
"""
The MEDS II database was developed by NIST to support and assists their biometrics evaluation program.
...
...
@@ -103,17 +96,14 @@ class MEDSDatabase(CSVDatasetZTNorm):
def
__init__
(
self
,
protocol
):
# Downloading model if not exists
urls
=
[
"https://www.idiap.ch/software/bob/databases/latest/meds.tar.gz"
,
"http://www.idiap.ch/software/bob/databases/latest/meds.tar.gz"
,
]
get_file
(
filename
,
urls
)
urls
=
MEDSDatabase
.
urls
()
filename
=
get_file
(
"meds.tar.gz"
,
urls
)
self
.
annotation_type
=
"eyes-center"
self
.
fixed_positions
=
None
database
=
CSVDataset
(
dataset_protocol_path
,
filename
,
protocol
,
csv_to_sample_loader
=
make_pipeline
(
CSVToSampleLoader
(
...
...
@@ -128,3 +118,10 @@ class MEDSDatabase(CSVDatasetZTNorm):
)
super
().
__init__
(
database
)
@
staticmethod
def
urls
():
return
[
"https://www.idiap.ch/software/bob/databases/latest/meds.tar.gz"
,
"http://www.idiap.ch/software/bob/databases/latest/meds.tar.gz"
,
]
bob/bio/face/database/mobio.py
View file @
83c989e7
...
...
@@ -51,10 +51,7 @@ class MobioDatabase(CSVDatasetZTNorm):
def
__init__
(
self
,
protocol
):
# Downloading model if not exists
urls
=
[
"https://www.idiap.ch/software/bob/databases/latest/mobio.tar.gz"
,
"http://www.idiap.ch/software/bob/databases/latest/mobio.tar.gz"
,
]
urls
=
MobioDatabase
.
urls
()
filename
=
get_file
(
"mobio.tar.gz"
,
urls
)
self
.
annotation_type
=
"eyes-center"
...
...
@@ -77,9 +74,6 @@ class MobioDatabase(CSVDatasetZTNorm):
super
().
__init__
(
database
)
# def zprobes(self, proportion=0.20):
# return super().zprobes(proportion=proportion)
@
staticmethod
def
protocols
():
# TODO: Until we have (if we have) a function that dumps the protocols, let's use this one.
...
...
@@ -94,3 +88,10 @@ class MobioDatabase(CSVDatasetZTNorm):
"mobile0-male"
,
"mobile1-female"
,
]
@
staticmethod
def
urls
():
return
[
"https://www.idiap.ch/software/bob/databases/latest/mobio.tar.gz"
,
"http://www.idiap.ch/software/bob/databases/latest/mobio.tar.gz"
,
]
bob/bio/face/database/morph.py
View file @
83c989e7
...
...
@@ -60,10 +60,7 @@ class MorphDatabase(CSVDatasetZTNorm):
def
__init__
(
self
,
protocol
):
# Downloading model if not exists
urls
=
[
"https://www.idiap.ch/software/bob/databases/latest/morph.tar.gz"
,
"http://www.idiap.ch/software/bob/databases/latest/morph.tar.gz"
,
]
urls
=
MorphDatabase
.
urls
()
filename
=
get_file
(
"morph.tar.gz"
,
urls
)
self
.
annotation_type
=
"eyes-center"
...
...
@@ -85,3 +82,10 @@ class MorphDatabase(CSVDatasetZTNorm):
)
super
().
__init__
(
database
)
@
staticmethod
def
urls
():
return
[
"https://www.idiap.ch/software/bob/databases/latest/morph.tar.gz"
,
"http://www.idiap.ch/software/bob/databases/latest/morph.tar.gz"
,
]
bob/bio/face/database/multipie.py
View file @
83c989e7
...
...
@@ -23,10 +23,7 @@ class MultipieDatabase(CSVDataset):
def
__init__
(
self
,
protocol
):
# Downloading model if not exists
urls
=
[
"https://www.idiap.ch/software/bob/databases/latest/multipie.tar.gz"
,
"http://www.idiap.ch/software/bob/databases/latest/multipie.tar.gz"
,
]
urls
=
MultipieDatabase
.
urls
()
filename
=
get_file
(
"multipie.tar.gz"
,
urls
)
self
.
annotation_type
=
[
"eyes-center"
,
"left-profile"
,
"right-profile"
]
...
...
@@ -72,3 +69,10 @@ class MultipieDatabase(CSVDataset):
"P081"
,
"P090"
,
]
@
staticmethod
def
urls
():
return
[
"https://www.idiap.ch/software/bob/databases/latest/multipie.tar.gz"
,
"http://www.idiap.ch/software/bob/databases/latest/multipie.tar.gz"
,
]
bob/bio/face/test/test_databases.py
View file @
83c989e7
...
...
@@ -27,6 +27,7 @@ from bob.bio.base.test.test_database_implementations import (
check_database_zt
,
)
import
bob.core
from
bob.extension.download
import
get_file
logger
=
bob
.
core
.
log
.
setup
(
"bob.bio.face"
)
...
...
@@ -159,6 +160,16 @@ def test_lfw():
def
test_mobio
():
from
bob.bio.face.database
import
MobioDatabase
# Getting the absolute path
urls
=
MobioDatabase
.
urls
()
filename
=
get_file
(
"mobio.tar.gz"
,
urls
)
# Removing the file before the test
try
:
os
.
remove
(
filename
)
except
:
pass
protocols
=
MobioDatabase
.
protocols
()
for
p
in
protocols
:
database
=
MobioDatabase
(
protocol
=
p
)
...
...
@@ -188,6 +199,16 @@ def test_mobio():
def
test_multipie
():
from
bob.bio.face.database
import
MultipieDatabase
# Getting the absolute path
urls
=
MultipieDatabase
.
urls
()
filename
=
get_file
(
"multipie.tar.gz"
,
urls
)
# Removing the file before the test
try
:
os
.
remove
(
filename
)
except
:
pass
protocols
=
MultipieDatabase
.
protocols
()
for
p
in
protocols
:
...
...
@@ -324,8 +345,19 @@ def test_fargo():
def
test_meds
():
from
bob.bio.face.database
import
MEDSDatabase
# Getting the absolute path
urls
=
MEDSDatabase
.
urls
()
filename
=
get_file
(
"meds.tar.gz"
,
urls
)
# Removing the file before the test
try
:
os
.
remove
(
filename
)
except
:
pass
database
=
MEDSDatabase
(
"verification_fold1"
)
assert
len
(
database
.
background_model_samples
())
==
234
...
...
Write
Preview
Markdown
is supported
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