All Projects → CharlesPikachu → VideoGan

CharlesPikachu / VideoGan

Licence: MIT License
Implementation of Generating Videos with Scene Dynamics

Programming Languages

python
139335 projects - #7 most used programming language

Labels

VideoGan

Implementation of Generating Videos with Scene Dynamics.
You can star this repository to keep track of the project if it's helpful for you, thank you for your support.

Effect

Model trained after two epochs

giphy giphy giphy giphy giphy giphy giphy giphy
giphy giphy giphy giphy giphy giphy giphy giphy

Model trained after three epochs

giphy giphy giphy giphy giphy giphy giphy giphy
giphy giphy giphy giphy giphy giphy giphy giphy

Model trained after four epochs

giphy giphy giphy giphy giphy giphy giphy giphy
giphy giphy giphy giphy giphy giphy giphy giphy

Model trained after five epochs

giphy giphy giphy giphy giphy giphy giphy giphy
giphy giphy giphy giphy giphy giphy giphy giphy

Model trained after six epochs

giphy giphy giphy giphy giphy giphy giphy giphy
giphy giphy giphy giphy giphy giphy giphy giphy

Model trained after seven epochs

giphy giphy giphy giphy giphy giphy giphy giphy
giphy giphy giphy giphy giphy giphy giphy giphy

Dependency

  • numpy
  • imageio
  • opencv-python
  • tensorflow-gpu(version1.2)

To Do

  • Train the model of videoGan(that is train).
  • Generating videos using videoGan(that is test).

Train

Step1

  • download the data for training. click → link.
for example, you can download:
<Golf Only> → http://data.csail.mit.edu/videogan/golf.tar.bz2
<List of Golf Files> → http://data.csail.mit.edu/videogan/golf.txt

Step2

  • Unzip the folders that you have downloaded.
for example, if you have downloaded the data of golf, then you can execute:
"bunzip2 golf.tar.bz2"
"tar xvf golf.tar"

Step3

  • modify config.py according to your needs.
options explain:
-info: 
	Introduce options.
-batch_size: 
	Number of videos to process in a batch.
-lr_g: 
	Learning rate for generator.
-lr_d: 
	Learning rate for discriminator.
-beta1_g: 
	Beta1 for generator.
-beta1_d: 
	Beta1 for discriminator.
-dis_dim: 
	Scale for discriminator-channel.
-gen_dim: 
	Scale for generator-channel.
-gen_scale: 
	Scale for generator-width and height.
-pic_dim: 
	Dimension of image color.
-noise_dim: 
	Dimension of initial noise vector.
-sample_size: 
	Number of samples to be generated at once(for evaluate).
-mask_L1_lambda: 
	Weight for L1 regularizer of mask.
-trainlogfile: 
	Record the train info(filename).
-modelSaved: 
	Save the trained model(path).
-samplesSaved: 
	Save the sample videos from generator(path).
-max_epoch: 
	Number of training epochs.
-save_interval: 
	Save and test the model each save_interval epochs.
-trainSet: 
	The paths of the videos for training.
-imgSize: 
	The size of img(each frame) in the videos(trainSet).

Step4

  • run "python3 train.py"
make sure that you have installed all of the dependencies mentioned in Dependency.
you can run "pip install -r requirements.txt" to install these dependencies.

Test

preparing

Reference

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].