Open Hidden-Hyperparameter opened 7 months ago
Thank @liuhanzuo for gathering these materials. On how to separate a .gif
file into .png
, you should ask GPT or follow the python code:
from PIL import Image
from PIL.GifImagePlugin import ImageSequence
import os
def convert_gif_to_png_frames(gif_path, png_folder='frames'):
gif = Image.open(gif_path)
i = 0
for frame in ImageSequence.Iterator(gif):
frame.save(os.path.join(png_folder, f'{i}.png'), 'PNG')
i += 1
convert_gif_to_png_frames('path_to_your_gif.gif')
You can develop this project by adding more units. The basic way is written in
README.md
, and the required audio or image informations are in the folderexternal_image_and_audio
.