Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.pad.base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
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.pad.base
Commits
9f709161
Commit
9f709161
authored
Feb 13, 2018
by
Pavel KORSHUNOV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make tests passing
parent
7b349d91
Pipeline
#16594
passed with stage
in 11 minutes and 17 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
13 deletions
+19
-13
bob/pad/base/test/dummy/database_sql.py
bob/pad/base/test/dummy/database_sql.py
+1
-1
bob/pad/base/test/test_algorithms.py
bob/pad/base/test/test_algorithms.py
+5
-4
bob/pad/base/utils/helper_functions.py
bob/pad/base/utils/helper_functions.py
+8
-7
conda/meta.yaml
conda/meta.yaml
+2
-0
develop.cfg
develop.cfg
+3
-1
No files found.
bob/pad/base/test/dummy/database_sql.py
View file @
9f709161
...
...
@@ -16,7 +16,7 @@ from sqlalchemy.ext.declarative import declarative_base
regenerate_database
=
False
dbfile
=
bob
.
io
.
base
.
test_utils
.
datafile
(
"test_db.sql3"
,
"bob.pad.base.test"
)
dbfile
=
bob
.
io
.
base
.
test_utils
.
datafile
(
"test_db.sql3"
,
"bob.pad.base.test"
,
path
=
"data"
)
Base
=
declarative_base
()
...
...
bob/pad/base/test/test_algorithms.py
View file @
9f709161
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# @author: Manuel Guenther <Manuel.Guenther@idiap.ch>
# @author: Pavel Korshunov <pavel.korshunov@idiap.ch>
# @date: Tue May 17 12:09:22 CET 2016
#
from
__future__
import
print_function
import
numpy
as
np
from
bob.io.base.test_utils
import
datafile
from
bob.io.base
import
load
import
bob.io.image
# for image loading functionality
import
bob.bio.video
import
bob.pad.base
from
bob.pad.base.algorithm
import
SVM
import
random
...
...
bob/pad/base/utils/helper_functions.py
View file @
9f709161
...
...
@@ -2,6 +2,9 @@
# vim: set fileencoding=utf-8 :
import
numpy
as
np
import
bob.bio.video
import
itertools
def
convert_frame_cont_to_array
(
frame_container
):
...
...
@@ -59,8 +62,8 @@ def convert_and_prepare_features(features):
if
isinstance
(
features
[
0
],
FrameContainer
):
# if FrameContainer convert to 2D numpy array
return
self
.
convert_list_of_frame_cont_to_array
(
features
)
bob
.
bio
.
video
.
FrameContainer
):
# if FrameContainer convert to 2D numpy array
return
convert_list_of_frame_cont_to_array
(
features
)
else
:
return
np
.
vstack
(
features
)
...
...
@@ -87,7 +90,7 @@ def convert_list_of_frame_cont_to_array(frame_containers):
feature_vectors
=
[]
for
frame_container
in
frame_containers
:
video_features_array
=
self
.
convert_frame_cont_to_array
(
video_features_array
=
convert_frame_cont_to_array
(
frame_container
)
feature_vectors
.
append
(
video_features_array
)
...
...
@@ -117,8 +120,8 @@ def combinations(input_dict):
combinations
=
[
dict
(
zip
(
varNames
,
prod
))
for
prod
in
it
.
product
(
*
(
input_dict
[
varName
]
for
varName
in
varNames
))
for
prod
in
it
ertools
.
product
(
*
(
input_dict
[
varName
]
for
varName
in
varNames
))
]
return
combinations
...
...
@@ -213,7 +216,6 @@ def convert_array_to_list_of_frame_cont(data):
frame_container_list
=
[]
for
idx
,
vec
in
enumerate
(
data
):
frame_container
=
bob
.
bio
.
video
.
FrameContainer
(
)
# initialize the FrameContainer
...
...
@@ -223,4 +225,3 @@ def convert_array_to_list_of_frame_cont(data):
frame_container
)
# add current frame to FrameContainer
return
frame_container_list
conda/meta.yaml
View file @
9f709161
...
...
@@ -32,6 +32,7 @@ requirements:
run
:
-
python
-
setuptools
-
gridtk
test
:
imports
:
...
...
@@ -47,6 +48,7 @@ test:
requires
:
-
bob-devel {{ bob_devel }}.*
-
nose
-
gridtk
-
coverage
-
sphinx
-
sphinx_rtd_theme
...
...
develop.cfg
View file @
9f709161
...
...
@@ -5,15 +5,16 @@
[buildout]
parts = scripts
eggs = bob.pad.base
bob.extension
bob.db.base
bob.bio.base
gridtk
extensions = bob.buildout
mr.developer
auto-checkout = *
develop = src/bob.db.base
src/bob.bio.base
src/bob.extension
.
; options for bob.buildout
...
...
@@ -22,6 +23,7 @@ verbose = true
newest = false
[sources]
bob.extension = git git@gitlab.idiap.ch:bob/bob.extension
bob.db.base = git git@gitlab.idiap.ch:bob/bob.db.base.git
bob.bio.base = git git@gitlab.idiap.ch:bob/bob.bio.base.git
...
...
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