Skip to content
Snippets Groups Projects
Commit 3b7be9b0 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[doc] finished the doc for the DCGAN

parent a5d0052f
Branches
Tags
No related merge requests found
.. py:currentmodule:: bob.learn.pytorch .. py:currentmodule:: bob.learn.pytorch
User's guide
============
DCGAN
-----
Conditional GAN Conditional GAN
--------------- ===============
DR-GAN
------
.. py:currentmodule:: bob.learn.pytorch
DCGAN
=====
DCGAN stands for deeply convolutional GAN, and is described in the following paper [dcgan]_::
@InProceedings{radford-iclr-2016,
Author = {Radford, A. and Metz, L. and Chintala, S.},
Title = {Unsupervised {R}epresentation {L}earning with {D}eep
{C}onvolutional {G}enerative {A}dversarial {N}etworks},
BookTitle = {Intl {C}onf. on {L}earning {R}epresentation},
seq-number = {50},
year = 2016
}
Also, most of the code (architecture and training) has been borrowed `here <https://github.com/pytorch/examples/tree/master/dcgan>`_.
Here, the goal is to generate images of frontal faces. You can train a model
using the MULTI-PIE database just that by using the dedicated script::
$ ./bin/train_dcgan_multipie.py
If you have access to a GPU, you should run the script using this option::
$ ./bin/train_dcgan_multipie.py --use-gpu
Note that this script will consider frontal faces only (but all illumination conditions).
Generated samples will be saved after each training epoch. You can specify where to write
images using the ``--output-dir`` option (default to ``./dcgan-multipie``).
Here are some examples of saved images.
.. figure:: img/dcgan-multipie-epoch-1.png
:align: center
After 1 epoch
.. figure:: img/dcgan-multipie-epoch-5.png
:align: center
After 5 epoch
.. figure:: img/dcgan-multipie-epoch-20.png
:align: center
After 20 epoch
.. py:currentmodule:: bob.learn.pytorch
DR-GAN
======
doc/img/dcgan-multipie-epoch-1.png

581 KiB

doc/img/dcgan-multipie-epoch-20.png

489 KiB

doc/img/dcgan-multipie-epoch-5.png

498 KiB

...@@ -43,15 +43,27 @@ This package is basically organized as follows (some files are omitted for clari ...@@ -43,15 +43,27 @@ This package is basically organized as follows (some files are omitted for clari
+ ``scripts`` contains the various scripts to perform training. + ``scripts`` contains the various scripts to perform training.
+ ``trainers`` contains files implementing the different training procedure + ``trainers`` contains files implementing the different training procedure
In order to build the package, activate your bob environment, and do::
$ buildout
In the user's guide you will find more detailed instructions on how to run the various examples. In the user's guide you will find more detailed instructions on how to run the various examples.
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 3
guide guide_dcgan
guide_conditionalgan
guide_drgan
py_api py_api
References
----------
.. [dcgan] *A.Radford, L. Metz, S. Chintala*. **Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks** Intl Conf. on Learning Representation, 2016. `arXiv <https://arxiv.org/abs/1511.06434>`__
Licensing Licensing
--------- ---------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment