pix2pix-Next-Frame-Prediction
generates video by recursively generating images with pix2pix.
We use the memo's script for training and prediction.
training : affinelayer/pix2pix-tensorflow
prediction : memo/webcam-pix2pix-tensorflow
- simple training
- re-training using this technique
- run realtime
Source : https://vimeo.com/223771736
- ffmpeg
- Split movie to image sequence
python create_dataset.py data/XXX.mp4 data/XXX 30 png
- Resize source images
python pix2pix/tools/process.py --input_dir data/XXX --operation resize --output_dir data/resized
- Copy the file at step2
cp -r data/resized data/resized2
-
Delete image_0000.png of resized2 and image_xxxx.png(last image) of resized1
-
Rename the images
python rename.py data/resized
python rename.py data/resized2
- Combine resized 2 set of images
python pix2pix/tools/process.py --input_dir data/resized --b_dir data/resized2 --operation combine --output_dir data/combined
- Split into train/val set
python pix2pix/tools/split.py --dir data/combined
python pix2pix/pix2pix.py --mode train --output_dir dst_path --max_epochs 200 --input_dir data_path --which_direction AtoB
python generate.py models/XXX.json generate/src generate/dst num_itr
- combine
ffmpeg -r 30 -i generate/dst/%04d.png -vcodec libx264 -pix_fmt yuv420p -r 30 movie.mp4
- Resize
ffmpeg -i movie.mp4 -vf scale=640:-1 m.mp4
- affinelayer/pix2pix-tensorflow
- memo/webcam-pix2pix-tensorflow
- magenta/magenta/video/next_frame_prediction_pix2pix
- A train window
MIT