Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
layumi authored Oct 11, 2017
1 parent 4b295af commit df62cdc
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions DCGAN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,13 @@ source activate dcgan
### Let's start
We did some slight changes compare to the original code. You can download the [my forked code](https://github.com/layumi/DCGAN-tensorflow) first and then modify the codes as we did.

### 1.Output Size
### 1.Train

We noticed that directly training on 256x256 input images will lead to random noisy images.
`python main.py --dataset duke_train --train --input_height 128 --output_height 128 --options 1`

So we use DCGAN to generate 128x128 output then resize it to 256x256 for further training.
(https://github.com/layumi/Person-reID_GAN/blob/master/DCGAN/utils.py#L48)
`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.Random vector
We use `option=5` to generate images. You can change the range of input random vector.
(https://github.com/layumi/Person-reID_GAN/blob/master/DCGAN/utils.py#L223)

### 3.Train

Change the visualization setting from `OPTION = 5` to ` OPTION = 1` (https://github.com/layumi/Person-reID_GAN/blob/master/DCGAN/main.py#L100)

Uncomment (https://github.com/layumi/Person-reID_GAN/blob/master/DCGAN/utils.py#L50)

Comment (https://github.com/layumi/Person-reID_GAN/blob/master/DCGAN/utils.py#L48)

Then Train: `python main.py --dataset duke_train --train --input_height 128 --output_height 128`

`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.

### 4.Test
Change the visualization setting from `OPTION = 1` to ` OPTION = 5` (https://github.com/layumi/Person-reID_GAN/blob/master/DCGAN/main.py#L100)

Uncomment (https://github.com/layumi/Person-reID_GAN/blob/master/DCGAN/utils.py#L48)

Comment (https://github.com/layumi/Person-reID_GAN/blob/master/DCGAN/utils.py#L50)

Test: `python main.py --dataset duke_train`
### 2.Test

`python main.py --dataset duke_train --options 5`
It will use your trained model and generate 48,000 images for the following semi-supervised training.

0 comments on commit df62cdc

Please sign in to comment.