-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微调模型时的视频读取方式 #861
Comments
可以看#617, 用视频推理时使用的 |
Hi, 看Datasetset类,tsc_loader是一个封装类,从对象存储或者本地读取文件,可以直接调用里面的read_frames_decord方法,不要's3://'的部分(从对象存储读取文件),把 返回的和直接从tcs_loader返回是一样的 def read_frames_decord(
video_path, num_frames, sample='rand', fix_start=None,
client=None, clip=None, min_num_frames=4
):
# if 's3://' in video_path:
# video_bytes = client.get(video_path)
# video_reader = VideoReader(io.BytesIO(video_bytes), num_threads=1)
else:
# 用这个,
video_reader = VideoReader(video_path, num_threads=1)
vlen = len(video_reader)
fps = video_reader.get_avg_fps()
duration = vlen / float(fps)
.... |
谢谢,已经可以了,视频最大支持32帧是吗 |
最大可以到64 frame |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: