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.pad.face
Commits
d6b1a86c
Commit
d6b1a86c
authored
Nov 25, 2020
by
Amir MOHAMMADI
Browse files
[VideoToFrames] Fix for VideoAsArray and VideoLikeContainer
parent
1075c8a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/face/transformer/VideoToFrames.py
View file @
d6b1a86c
...
...
@@ -14,9 +14,11 @@ class VideoToFrames(TransformerMixin, BaseEstimator):
logger
.
debug
(
f
"
{
_frmt
(
self
)
}
.transform"
)
output
=
[]
for
sample
in
video_samples
:
annotations
=
getattr
(
sample
,
"annotations"
,
{})
annotations
=
getattr
(
sample
,
"annotations"
,
{})
or
{}
for
frame
,
frame_id
in
zip
(
sample
.
data
.
data
,
sample
.
data
.
indices
):
# video is an instance of VideoAsArray or VideoLikeContainer
video
=
sample
.
data
for
frame
,
frame_id
in
zip
(
video
,
video
.
indices
):
new_sample
=
mario
.
Sample
(
frame
,
frame_id
=
frame_id
,
...
...
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