# DCGAN in Tensorflow
Tensorflow implementation of [Deep Convolutional Generative Adversarial Networks](http://arxiv.org/abs/1511.06434) which is a stabilize Generative Adversarial Networks. The referenced torch code can be found [here](https://github.com/soumith/dcgan.torch).
![alt tag](DCGAN.png)
* [Brandon Amos](http://bamos.github.io/) wrote an excellent [blog post](http://bamos.github.io/2016/08/09/deep-completion/) and [image completion code](https://github.com/bamos/dcgan-completion.tensorflow) based on this repo.
* *To avoid the fast convergence of D (discriminator) network, G (generator) network is updated twice for each D network update, which differs from original paper.*
## Online Demo
[<img src="https://raw.githubusercontent.com/carpedm20/blog/master/content/images/face.png">](http://carpedm20.github.io/faces/)
[link](http://carpedm20.github.io/faces/)
## Prerequisites
- Python 2.7 or Python 3.3+
- [Tensorflow 0.12.1](https://github.com/tensorflow/tensorflow/tree/r0.12)
- [SciPy](http://www.scipy.org/install.html)
- [pillow](https://github.com/python-pillow/Pillow)
- (Optional) [moviepy](https://github.com/Zulko/moviepy) (for visualization)
- (Optional) [Align&Cropped Images.zip](http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html) : Large-scale CelebFaces Dataset
## Usage
First, download dataset with:
$ python download.py mnist celebA
To train a model with downloaded dataset:
$ python main.py --dataset mnist --input_height=28 --output_height=28 --train
$ python main.py --dataset celebA --input_height=108 --train --crop
To test with an existing model:
$ python main.py --dataset mnist --input_height=28 --output_height=28
$ python main.py --dataset celebA --input_height=108 --crop
Or, you can use your own dataset (without central crop) by:
$ mkdir data/DATASET_NAME
... add images to data/DATASET_NAME ...
$ python main.py --dataset DATASET_NAME --train
$ python main.py --dataset DATASET_NAME
$ # example
$ python main.py --dataset=eyes --input_fname_pattern="*_cropped.png" --train
## Results
![result](assets/training.gif)
### celebA
After 6th epoch:
![result3](assets/result_16_01_04_.png)
After 10th epoch:
![result4](assets/test_2016-01-27%2015:08:54.png)
### Asian face dataset
![custom_result1](web/img/change5.png)
![custom_result1](web/img/change2.png)
![custom_result2](web/img/change4.png)
### MNIST
MNIST codes are written by [@PhoenixDai](https://github.com/PhoenixDai).
![mnist_result1](assets/mnist1.png)
![mnist_result2](assets/mnist2.png)
![mnist_result3](assets/mnist3.png)
More results can be found [here](./assets/) and [here](./web/img/).
## Training details
Details of the loss of Discriminator and Generator (with custom dataset not celebA).
![d_loss](assets/d_loss.png)
![g_loss](assets/g_loss.png)
Details of the histogram of true and fake result of discriminator (with custom dataset not celebA).
![d_hist](assets/d_hist.png)
![d__hist](assets/d__hist.png)
## Related works
- [BEGAN-tensorflow](https://github.com/carpedm20/BEGAN-tensorflow)
- [DiscoGAN-pytorch](https://github.com/carpedm20/DiscoGAN-pytorch)
- [simulated-unsupervised-tensorflow](https://github.com/carpedm20/simulated-unsupervised-tensorflow)
## Author
Taehoon Kim / [@carpedm20](http://carpedm20.github.io/)
没有合适的资源?快使用搜索试试~ 我知道了~
DCGAN-tensorflow-master.zip_DCGAN_adversarial_tensorflow_生成对抗_生成
共90个文件
png:48个
jpg:9个
js:6个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 114 浏览量
2022-09-15
00:21:57
上传
评论
收藏 38.86MB ZIP 举报
温馨提示
LINUX平台下,当然也可以在windows平台下运行,DCGAN为卷积下的生成对抗网络,在tensorflow平台的基础上。
资源推荐
资源详情
资源评论
收起资源包目录
DCGAN-tensorflow-master.zip (90个子文件)
DCGAN-tensorflow-master
main.py 4KB
DCGAN.png 147KB
utils.py 8KB
assets
test_2016-01-27 15:09:46.png 515KB
test_2016-01-27 15:08:54.png 505KB
mnist1.png 28KB
mnist3.png 27KB
mnist2.png 26KB
test_2016-01-27 15:09:04.png 513KB
result_16_01_03.png 578KB
result_16_01_04_.png 518KB
g_loss.png 105KB
result_16_01_04.png 510KB
d_hist.png 381KB
test_2016-01-27 15:07:47.png 505KB
custom_dataset.png 488KB
d__hist.png 347KB
d_loss.png 96KB
test_2016-01-27 15:08:45.png 507KB
test_2016-01-27 15:08:57.png 514KB
training.gif 14.59MB
test_2016-01-27 15:09:00.png 510KB
test_2016-01-27 15:09:50.png 504KB
LICENSE 1KB
ops.py 4KB
model.py 20KB
.gitignore 989B
web
css
fakeLoader.css 8KB
font-awesome.min.css 21KB
main.css 11KB
app.py 283B
img
f8.png 8KB
f5.png 8KB
f3.png 8KB
single3.gif 320KB
single4.gif 319KB
change3.png 517KB
change1.png 515KB
t6.jpg 2KB
t2.jpg 3KB
f7.png 8KB
f17.png 8KB
f13.png 8KB
change5.png 513KB
f16.png 9KB
model.png 120KB
f10.png 8KB
change6.png 513KB
f12.png 8KB
t5.jpg 3KB
f2.png 8KB
f15.png 8KB
t3.jpg 3KB
t7.jpg 2KB
intro-bg.jpg 86KB
single2.gif 319KB
t1.jpg 3KB
f4.png 8KB
f14.png 8KB
f11.png 8KB
logo.png 20KB
f6.png 8KB
ogimage.png 1.27MB
f1.png 8KB
change2.png 524KB
f9.png 8KB
average.png 8KB
t4.jpg 3KB
single1.gif 318KB
downloads-bg.jpg 108KB
change4.png 519KB
fonts
slick.woff 1KB
fontawesome-webfont.eot 55KB
fontawesome-webfont.woff 64KB
FontAwesome.otf 84KB
fontawesome-webfont.svg 280KB
fontawesome-webfont.ttf 110KB
index.html 28KB
js
vendor
pixel.min.js 17KB
jquery.easing.min.js 5KB
fakeLoader.min.js 5KB
convnet.js 80KB
layers.js 32.19MB
app.js 11KB
videos
background.mp4 1.83MB
random.mp4 1.03MB
training.mp4 3.69MB
README.md 3KB
average.png 8KB
download.py 5KB
共 90 条
- 1
资源评论
朱moyimi
- 粉丝: 61
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功