process_predictions.py 文件源码

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

项目:traffic_detection_yolo2 作者: wAuner 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号