Commit d6b1a86c authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

[VideoToFrames] Fix for VideoAsArray and VideoLikeContainer

parent 1075c8a5
......@@ -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,
......
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