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
8f163bf4
Commit
8f163bf4
authored
Mar 06, 2018
by
Olegs NIKISINS
Browse files
Moved condition to one line, removed empty dictionary check
parent
e588deb4
Pipeline
#17376
passed with stage
in 16 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/video/preprocessor/Wrapper.py
View file @
8f163bf4
...
...
@@ -120,9 +120,8 @@ class Wrapper(bob.bio.base.preprocessor.Preprocessor):
for
index
,
frame
,
_
in
frames
:
annots
=
None
# if annotations are given, and if particular frame annotations are not missing we take them:
if
annot
ations
is
not
None
and
index
i
n
annotations
.
keys
()
and
annotations
[
index
]:
annots
=
annotations
[
index
]
annot
s
=
annotations
[
index
]
i
f
annotations
is
not
None
and
index
in
annotations
else
None
# preprocess image (by default: detect a face)
preprocessed
=
self
.
preprocessor
(
frame
,
annots
)
...
...
bob/bio/video/test/test_preprocessor.py
View file @
8f163bf4
...
...
@@ -73,9 +73,9 @@ def test_missing_annotations():
preprocessed_video
=
preprocessor
(
video
,
annotations
)
assert
len
(
preprocessed_video
)
==
2
assert
len
(
preprocessed_video
)
==
3
assert
preprocessed_video
[
0
][
1
]
==
3
assert
[
x
[
0
]
for
x
in
preprocessed_video
]
==
[
'0'
,
'3'
]
assert
[
x
[
0
]
for
x
in
preprocessed_video
]
==
[
'0'
,
'1'
,
'3'
]
def
test_detect
():
...
...
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