def make_video(file_path, conf):
print 'reading files from:', file_path
ground_truth = cPickle.load(open(file_path + '/ground_truth.pkl', "rb"))
gen_images = cPickle.load(open(file_path + '/gen_image_seq.pkl', "rb"))
distrib = cPickle.load(open(file_path + '/output_distrib_list.pkl', "rb"))
ground_truth = np.split(ground_truth, ground_truth.shape[1], axis=1)
ground_truth = np.squeeze(ground_truth)
fused_gif = video_prediction.utils_vpred.create_gif.assemble_gif([ground_truth, gen_images, distrib])
import re
itr_vis = re.match('.*?([0-9]+)$', conf['visualize']).group(1)
video_prediction.utils_vpred.create_gif.npy_to_gif(fused_gif, file_path +'/' + conf['experiment_name'] + '_' + str(itr_vis))
return fused_gif
评论列表
文章目录