Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.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.pad.face
Commits
fde2934f
Commit
fde2934f
authored
6 years ago
by
Guillaume HEUSCH
Browse files
Options
Downloads
Patches
Plain Diff
[database] removed unnecessary stuff while loading data
parent
0468a0fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!77
CASIA-SURF database
Pipeline
#26369
passed
6 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/database/casiasurf.py
+4
-16
4 additions, 16 deletions
bob/pad/face/database/casiasurf.py
with
4 additions
and
16 deletions
bob/pad/face/database/casiasurf.py
+
4
−
16
View file @
fde2934f
...
@@ -66,23 +66,11 @@ class CasiaSurfPadFile(VideoPadFile):
...
@@ -66,23 +66,11 @@ class CasiaSurfPadFile(VideoPadFile):
Returns
Returns
-------
-------
dict:
dict:
"
video
"
data (i.e. one frame)
for multiple streams stored in the dictionary.
image data
for multiple streams stored in the dictionary.
The structure of the dictionary: ``data={
"
stream1_name
"
:
FrameContainer1
,
"
stream2_name
"
:
...
}``
The structure of the dictionary: ``data={
"
stream1_name
"
:
numpy array
,
"
stream2_name
"
:
numpy array
}``
Names of the streams are defined in ``self.stream_type``.
Names of the streams are defined in ``self.stream_type``.
"""
"""
return
self
.
s
.
load
(
directory
,
extension
,
modality
=
self
.
stream_type
)
# get the dict of numpy array
data
=
self
.
s
.
load
(
directory
,
extension
,
modality
=
self
.
stream_type
)
# convert that to dict of FrameContainer
data_to_return
=
{}
for
k
in
data
.
keys
():
frame_container
=
FrameContainer
()
for
idx
,
item
in
enumerate
(
data
[
k
]):
frame_container
.
add
(
idx
,
item
)
# add frame to FrameContainer
data_to_return
[
k
]
=
frame_container
return
data_to_return
class
CasiaSurfPadDatabase
(
PadDatabase
):
class
CasiaSurfPadDatabase
(
PadDatabase
):
...
...
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