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
9d8dfd03
There was a problem fetching the pipeline summary.
Commit
9d8dfd03
authored
8 years ago
by
Amir Mohammadi
Browse files
Options
Downloads
Patches
Plain Diff
[mobio] fix the annotation loading
parent
3f377801
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
Resolve "Some database interfaces do not provide access to the annotations stored in the low-level databases", Add replay mobile bob.db.replaymobile
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/face/database/mobio.py
+32
-11
32 additions, 11 deletions
bob/bio/face/database/mobio.py
with
32 additions
and
11 deletions
bob/bio/face/database/mobio.py
+
32
−
11
View file @
9d8dfd03
...
...
@@ -14,6 +14,14 @@ from .database import FaceBioFile
from
bob.bio.base.database
import
ZTBioDatabase
class
MobioBioFile
(
FaceBioFile
):
"""
FaceBioFile implementation of the Replay Mobile Database
"""
def
__init__
(
self
,
f
):
super
(
FaceBioFile
,
self
).
__init__
(
client_id
=
f
.
client_id
,
path
=
f
.
path
,
file_id
=
f
.
id
)
self
.
_f
=
f
class
MobioBioDatabase
(
ZTBioDatabase
):
"""
Implements verification API for querying Mobio database.
...
...
@@ -21,29 +29,42 @@ class MobioBioDatabase(ZTBioDatabase):
def
__init__
(
self
,
original_directory
=
None
,
original_extension
=
None
,
annotation_directory
=
None
,
annotation_extension
=
'
.pos
'
,
**
kwargs
):
# call base class constructors to open a session to the database
super
(
MobioBioDatabase
,
self
).
__init__
(
name
=
'
mobio
'
,
**
kwargs
)
super
(
MobioBioDatabase
,
self
).
__init__
(
name
=
'
mobio
'
,
original_directory
=
original_directory
,
original_extension
=
original_extension
,
annotation_directory
=
annotation_directory
,
annotation_extension
=
annotation_extension
,
**
kwargs
)
from
bob.db.mobio.query
import
Database
as
LowLevelDatabase
self
.
__db
=
LowLevelDatabase
()
self
.
_db
=
LowLevelDatabase
(
original_directory
,
original_extension
,
annotation_directory
,
annotation_extension
)
def
model_ids_with_protocol
(
self
,
groups
=
None
,
protocol
=
None
,
gender
=
None
):
return
self
.
_
_
db
.
model_ids
(
groups
=
groups
,
protocol
=
protocol
,
gender
=
gender
)
return
self
.
_db
.
model_ids
(
groups
=
groups
,
protocol
=
protocol
,
gender
=
gender
)
def
tmodel_ids_with_protocol
(
self
,
protocol
=
None
,
groups
=
None
,
**
kwargs
):
return
self
.
_
_
db
.
tmodel_ids
(
protocol
=
protocol
,
groups
=
groups
,
**
kwargs
)
return
self
.
_db
.
tmodel_ids
(
protocol
=
protocol
,
groups
=
groups
,
**
kwargs
)
def
objects
(
self
,
groups
=
None
,
protocol
=
None
,
purposes
=
None
,
model_ids
=
None
,
**
kwargs
):
retval
=
self
.
_
_
db
.
objects
(
groups
=
groups
,
protocol
=
protocol
,
purposes
=
purposes
,
model_ids
=
model_ids
,
**
kwargs
)
return
[
Face
BioFile
(
client_id
=
f
.
client_id
,
path
=
f
.
path
,
file_id
=
f
.
id
)
for
f
in
retval
]
retval
=
self
.
_db
.
objects
(
groups
=
groups
,
protocol
=
protocol
,
purposes
=
purposes
,
model_ids
=
model_ids
,
**
kwargs
)
return
[
Mobio
BioFile
(
f
)
for
f
in
retval
]
def
tobjects
(
self
,
groups
=
None
,
protocol
=
None
,
model_ids
=
None
,
**
kwargs
):
retval
=
self
.
_
_
db
.
tobjects
(
groups
=
groups
,
protocol
=
protocol
,
model_ids
=
model_ids
,
**
kwargs
)
return
[
Face
BioFile
(
client_id
=
f
.
client_id
,
path
=
f
.
path
,
file_id
=
f
.
id
)
for
f
in
retval
]
retval
=
self
.
_db
.
tobjects
(
groups
=
groups
,
protocol
=
protocol
,
model_ids
=
model_ids
,
**
kwargs
)
return
[
Mobio
BioFile
(
f
)
for
f
in
retval
]
def
zobjects
(
self
,
groups
=
None
,
protocol
=
None
,
**
kwargs
):
retval
=
self
.
__db
.
zobjects
(
groups
=
groups
,
protocol
=
protocol
,
**
kwargs
)
return
[
FaceBioFile
(
client_id
=
f
.
client_id
,
path
=
f
.
path
,
file_id
=
f
.
id
)
for
f
in
retval
]
retval
=
self
.
_db
.
zobjects
(
groups
=
groups
,
protocol
=
protocol
,
**
kwargs
)
return
[
MobioBioFile
(
f
)
for
f
in
retval
]
def
annotations
(
self
,
myfile
):
return
self
.
_db
.
annotations
(
myfile
.
_f
)
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