1 Star 0 Fork 1

Kahsolt/Frequency-GS

forked from bhy/Frequency-GS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
merge_images_to_video.py 593 Bytes
一键复制 编辑 原始数据 按行查看 历史
bhy 提交于 2024-08-31 06:46 . first commit
import os
import imageio
from PIL import Image
from tqdm import tqdm
from glob import glob
import numpy as np
def merge_images_to_video(path, name='train'):
image_names = sorted(glob(os.path.join(path, '*.png')))
video = imageio.get_writer(os.path.join(path, f"{name}_video.mp4"), mode='I', fps=5, codec='libx264',quality=10.0)
for img_n in tqdm(image_names):
img = np.array(Image.open(img_n))
video.append_data(np.array(img))
video.close()
if __name__ == '__main__':
image_path = 'output/train/vis'
merge_images_to_video(image_path)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kahsolt/frequency-gs.git
git@gitee.com:kahsolt/frequency-gs.git
kahsolt
frequency-gs
Frequency-GS
master

搜索帮助