make_video.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:traffic_detection_yolo2 作者: wAuner 项目源码 文件源码
def frames2video(name, path):
    """
    Merges images in path into a video

    :param path: path with prediction images
    :return:
    """
    batch_size = 100
    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(name + '_video.mp4', fps=25)

    for fname in tqdm.tqdm(fnames):
        videowriter.append_data(plt.imread(os.path.join(path, fname)))
    videowriter.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号