Commit 9f709161 authored by Pavel KORSHUNOV's avatar Pavel KORSHUNOV

make tests passing

parent 7b349d91
Pipeline #16594 passed with stage
in 11 minutes and 17 seconds
......@@ -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()
......
#!/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
......
......@@ -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 itertools.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
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment