add convert stats in parallel using multiple thread and decord video backend.
This commit is contained in:
parent
d8f53d93c0
commit
dcd0f5c519
|
@ -24,6 +24,7 @@ from pathlib import Path
|
|||
from typing import Any, ClassVar
|
||||
|
||||
import decord
|
||||
import numpy as np
|
||||
import pyarrow as pa
|
||||
import torch
|
||||
import torchvision
|
||||
|
@ -249,7 +250,7 @@ def decode_video_frames_torchcodec(
|
|||
def decode_video_frames_decord(
|
||||
video_path: Path | str,
|
||||
timestamps: list[float],
|
||||
) -> torch.Tensor::
|
||||
) -> torch.Tensor:
|
||||
video_path = str(video_path)
|
||||
vr = decord.VideoReader(video_path)
|
||||
num_frames = len(vr)
|
||||
|
|
Loading…
Reference in New Issue