Tzerjen Wei
Tzerjen Wei
Extract video frames into png files, e.g. using ffmpeg Then modify the lines like `Image.open('CycleGAN/A/A_%05d.png'%i).convert('RGB')` to the corresponding file name pattern.
In my experience, the original CycleGAN handles the background change pretty well, especially when the backgrounds are reasonably stable and fixed.
Thanks, I will modernize the code soon, and move old code to a legacy folder and hopefully make a requirements.txt for them.
You use the methods mentioned here https://keras.io/getting-started/faq/#how-can-i-save-a-keras-model to save/load keras models and/or weights. The generators are `netGB` and `netGA`. The function `showG` shows how to use functions `cycleA_generate` and `cycleA_generate`...
The keras version uses a unet as generator while the lasagne one uses resnet.
The generating models are defined in these lines. ```python netGB = UNET_G(imageSize, nc_in, nc_out, ngf) netGA = UNET_G(imageSize, nc_out, nc_in, ngf) ``` You can save them after they are trained.
OK. See https://github.com/tjwei/GANotebooks/blob/master/CycleGAN-lasagne-fber.ipynb This is pretty much a copy of CycleGAN-lasagne.ipynb Except that the width and height of the image can be different. The original videos can be found at...
From the error message, it looks like module name can't contain ".". replace strings like "initial.{0}-{1}.convt" to "initial-{0}-{1}-convt" and 'initial.{0}.relu' to 'initial-{0}-relu' might solve the issue.
You can use the script here https://github.com/phillipi/pix2pix To prepare the dataset
The pretrained model is not included in the master branch. I uploaded the the npz file here: https://github.com/tjwei/GANotebooks/tree/pretrained If you want to train the model, then the pretrained model is...