Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.video
Commits
d41de6b0
Commit
d41de6b0
authored
Jun 17, 2015
by
Manuel Günther
Browse files
Added script to test video extensions on AT&T
parent
d66176e9
Changes
5
Hide whitespace changes
Inline
Side-by-side
bob/bio/video/extractor/Extractor.py
View file @
d41de6b0
...
...
@@ -47,7 +47,7 @@ class Extractor (bob.bio.base.extractor.Extractor):
if
self
.
compressed_io
:
return
utils
.
save_compressed
(
frame_container
,
filename
,
self
.
extractor
.
write_feature
)
else
:
frame_container
.
save
(
bob
.
io
.
base
.
HDF5File
(
filename
,
'w'
),
self
.
extractor
.
sav
e_feature
)
frame_container
.
save
(
bob
.
io
.
base
.
HDF5File
(
filename
,
'w'
),
self
.
extractor
.
writ
e_feature
)
def
train
(
self
,
data_list
,
extractor_file
):
...
...
bob/bio/video/test/dummy/__init__.py
0 → 100644
View file @
d41de6b0
bob/bio/video/test/dummy/database.py
0 → 100644
View file @
d41de6b0
import
bob.db.atnt
import
os
from
bob.bio.base.database
import
DatabaseBob
,
DatabaseBobZT
from
bob.bio.base.test.utils
import
atnt_database_directory
class
DummyDatabase
(
DatabaseBobZT
):
def
__init__
(
self
):
# call base class constructor with useful parameters
DatabaseBobZT
.
__init__
(
self
,
database
=
bob
.
db
.
atnt
.
Database
(
original_directory
=
atnt_database_directory
()
),
name
=
'test'
,
check_original_files_for_existence
=
True
,
training_depends_on_protocol
=
False
,
models_depend_on_protocol
=
False
)
def
all_files
(
self
,
groups
=
[
'dev'
]):
return
DatabaseBob
.
all_files
(
self
,
groups
)
def
t_model_ids
(
self
,
group
=
'dev'
):
return
self
.
model_ids
(
group
)
def
t_enroll_files
(
self
,
model_id
,
group
=
'dev'
):
return
self
.
enroll_files
(
model_id
,
group
)
def
z_probe_files
(
self
,
group
=
'dev'
):
return
self
.
probe_files
(
None
,
group
)
# override the original file names to return a one-element lists of file names
def
original_file_names
(
self
,
files
):
return
[[
n
]
for
n
in
self
.
database
.
original_file_names
(
files
,
self
.
check_existence
)]
database
=
DummyDatabase
()
bob/bio/video/test/test_scripts.py
0 → 100644
View file @
d41de6b0
from
__future__
import
print_function
import
bob.bio.base
import
tempfile
from
bob.bio.base.test.test_scripts
import
_verify
def
test_verify_video
():
test_dir
=
tempfile
.
mkdtemp
(
prefix
=
'bobtest_'
)
# define dummy parameters
parameters
=
[
'-d'
,
'dummy-video'
,
'-p'
,
'bob.bio.video.preprocessor.Preprocessor("dummy")'
,
'-e'
,
'bob.bio.video.extractor.Extractor("dummy")'
,
'-a'
,
'bob.bio.video.algorithm.Algorithm("dummy")'
,
'--zt-norm'
,
'-s'
,
'test_video'
,
'--temp-directory'
,
test_dir
,
'--result-directory'
,
test_dir
,
'--imports'
,
'bob.bio.video'
]
print
(
bob
.
bio
.
base
.
tools
.
command_line
(
parameters
))
_verify
(
parameters
,
test_dir
,
'test_video'
)
setup.py
View file @
d41de6b0
...
...
@@ -104,6 +104,7 @@ setup(
'bob.bio.database'
:
[
'mobio-video = bob.bio.video.config.database.mobio:database'
,
'youtube = bob.bio.video.config.database.youtube:database'
,
'dummy-video = bob.bio.video.test.dummy.database:database'
,
# for test purposes only
],
},
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment