Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.face
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.face
Commits
34fbef50
Commit
34fbef50
authored
6 years ago
by
Guillaume HEUSCH
Browse files
Options
Downloads
Patches
Plain Diff
added fargo database
parent
5a403b50
No related branches found
No related tags found
1 merge request
!52
Add Fargo database
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/bio/face/database/__init__.py
+3
-0
3 additions, 0 deletions
bob/bio/face/database/__init__.py
bob/bio/face/database/fargo.py
+57
-0
57 additions, 0 deletions
bob/bio/face/database/fargo.py
setup.py
+2
-0
2 additions, 0 deletions
setup.py
with
62 additions
and
0 deletions
bob/bio/face/database/__init__.py
+
3
−
0
View file @
34fbef50
...
...
@@ -20,6 +20,9 @@ from .scface import SCFaceBioDatabase
from
.replaymobile
import
ReplayMobileBioDatabase
from
.msu_mfsd_mod
import
MsuMfsdModBioDatabase
from
.fargo
import
FargoBioDatabase
# gets sphinx autodoc done right - don't remove it
...
...
This diff is collapsed.
Click to expand it.
bob/bio/face/database/fargo.py
0 → 100644
+
57
−
0
View file @
34fbef50
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
"""
FARGO database implementation of bob.bio.base.database.Database interface.
It is an extension of an SQL-based database interface, which directly talks to FARGO database, for
verification experiments (good to use in bob.bio.base framework).
"""
import
os
import
bob.db.base
from
.database
import
FaceBioFile
from
bob.bio.base.database
import
BioDatabase
class
FargoBioDatabase
(
BioDatabase
):
"""
FARGO database implementation of :py:class:`bob.bio.base.database.BioDatabase` interface.
It is an extension of the database interface, which directly talks to ATNT database, for
verification experiments (good to use in bob.bio.base framework).
"""
def
__init__
(
self
,
original_directory
=
None
,
original_extension
=
'
.png
'
,
protocol
=
'
mc-rgb
'
,
**
kwargs
):
# call base class constructors to open a session to the database
super
(
FargoBioDatabase
,
self
).
__init__
(
name
=
'
fargo
'
,
original_directory
=
original_directory
,
original_extension
=
original_extension
,
protocol
=
protocol
,
**
kwargs
)
from
bob.db.fargo.query
import
Database
as
LowLevelDatabase
self
.
_db
=
LowLevelDatabase
(
original_directory
,
original_extension
,
protocol
=
protocol
)
def
objects
(
self
,
groups
=
None
,
purposes
=
None
,
protocol
=
None
,
model_ids
=
None
,
**
kwargs
):
retval
=
self
.
_db
.
objects
(
protocol
=
protocol
,
groups
=
groups
,
purposes
=
purposes
,
model_ids
=
model_ids
,
**
kwargs
)
return
[
FaceBioFile
(
client_id
=
f
.
client_id
,
path
=
f
.
path
,
file_id
=
f
.
id
)
for
f
in
retval
]
def
model_ids_with_protocol
(
self
,
groups
=
None
,
protocol
=
None
,
**
kwargs
):
return
self
.
_db
.
model_ids
(
groups
=
groups
,
protocol
=
protocol
)
def
annotations
(
self
,
file
):
if
self
.
annotation_directory
is
None
:
return
None
annotation_file
=
os
.
path
.
join
(
self
.
annotation_directory
,
file
.
path
+
self
.
annotation_extension
)
return
bob
.
db
.
base
.
read_annotation_file
(
annotation_file
,
'
eyecenter
'
)
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
0
View file @
34fbef50
...
...
@@ -136,6 +136,8 @@ setup(
'
replay-img-spoof = bob.bio.face.config.database.replay:replay_spoof
'
,
'
replaymobile-img-licit = bob.bio.face.config.database.replaymobile:replaymobile_licit
'
,
'
replaymobile-img-spoof = bob.bio.face.config.database.replaymobile:replaymobile_spoof
'
,
'
fargo = bob.bio.face.config.database.fargo:database
'
,
],
'
bob.bio.annotator
'
:
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment