我使用video2record处理一些短视频,我想将它们转换为tfrecord,然后将其输入到tensorflow中。 然后我在github上使用录像:https://github.com/ferreirafabio/video2tfrecord 但是当我运行它时,错误提示numpy错误 这是我的代码(python):
from video2tfrecord import convert_videos_to_tfrecord
convert_videos_to_tfrecord(source_path="video", destination_path="video", n_videos_in_record= 1 , n_frames_per_video = 5 , file_suffix="*.mp4")
以下是错误:
(p)中的AssertionError Traceback(最近一次通话结束) 从video2tfrecord中导入1个convert_videos_to_tfrecord 2 ----> 3 convert_videos_to_tfrecord(source_path =“ video”,destination_path =“ video”,n_videos_in_record = 1,n_frames_per_video = 5,file_suffix =“ *。mp4”)
/usr/local/lib/python3.6/dist-packages/video2tfrecord/video2tfrecord.py 在convert_videos_to_tfrecord(source_path,destination_path, n_videos_in_record,n_frames_per_video,file_suffix, density_optical_flow,宽度,高度,颜色深度,视频文件名) 174 total_batch_number = int(math.ceil(len(文件名)/ n_videos_in_record)) 175 print('Batch'+ str(i + 1)+'/'+ str(total_batch_number)+“ completed”) -> 176 assert data.size!= 0,“在视频到numpy转换期间出了点问题” (177)第177章 178 n_videos_in_record,i + 1,总批号,
AssertionError:视频到numpy转换期间出了些问题