def frames2video(path):
"""
Merges images in path into a video
:param path: path with prediction images
:return: nothing
"""
fnames = os.listdir(path)
fnames.sort()
images = np.array([plt.imread(os.path.join(path, fname)) for fname in fnames])
# h, w, c = images[0].shape
videowriter = imageio.get_writer('prediction_video.mp4', fps=25)
for im in images:
videowriter.append_data(im)
videowriter.close()
process_predictions.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录