A tensorflow implementation of "Deep Convolutional Generative Adversarial Networks"
Clone or download
Pull request Compare This branch is 12 commits ahead of layumi:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
model/trained_model
.gitignore
DCGAN.png
LICENSE
README.md
average.png
dcgan.yml
download.py
main.py
model.py
ops.py
utils.py

README.md

DCGAN in Tensorflow

Prerequisites

Add Cuda Path to bashrc first

export LD_LIBRARY_PATH="/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH"

We recommend you to install anaconda. Here we write a simple script for you to install the dependence by anaconda.

# install env (especially for old version Tensorflow)
conda env create -f dcgan.yml
# activate env, then you can run code in this env without downgrading the outside Tensorflow.
source activate dcgan

Let's start

1.Train

mkdir data
ln -rs your_dataset_path/DukeMTMC-reID/bounding_box_train ./data/duke_train
python main.py --dataset duke_train --train --input_height 128 --output_height 128 --options 1 --checkpoint_dir checkpointDuke --sample_dir samplesDuke --fps_gap 3

duke_train is the dir path which contains images. Here I use the (DukeMTMC-reID)[https://github.com/layumi/DukeMTMC-reID_evaluation] training set. You can change it to your dataset path.

2.Test

python main.py --dataset duke_train --options 5  --output_path duke_256_48000  --sample_size 48000  --input_height 128 --output_height 128 --checkpoint_dir checkpointDuke

It will use your trained model and generate 48000 images for the following semi-supervised training.