Skip to content

Commit

Permalink
add fast video loader
Browse files Browse the repository at this point in the history
  • Loading branch information
whwu committed Jun 15, 2021
1 parent 46a94c1 commit 83dcb88
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions codes/datasets/pipelines/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os.path as osp
import mmcv
import numpy as np
import math
from ...utils import FileClient, get_root_logger
from ..builder import PIPELINES
logger = get_root_logger()
Expand Down Expand Up @@ -175,7 +174,7 @@ def __call__(self, results):
stream = container.streams.video[0]
if self.multi_thread:
stream.thread_type = 'AUTO'
## check duration
# check duration
try:
duration = stream.duration * stream.time_base
except TypeError:
Expand Down Expand Up @@ -279,9 +278,6 @@ def __call__(self, results):

return results

def __repr__(self):
repr_str = self.__class__.__name__


@PIPELINES.register_module
class DecordDecode(object):
Expand All @@ -290,8 +286,8 @@ class DecordDecode(object):
Required keys are "filename" and "frame_inds",
added or modified keys are "img_group" and "ori_shape".
Attributes:
num_threads (int): multi thread processing.
accurate (bool): random access patterns
num_threads (int): multi thread processing.
accurate (bool): random access patterns
"""

def __init__(self, num_threads=0, accurate=True):
Expand Down

0 comments on commit 83dcb88

Please sign in to comment.