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

[doc] add the need for already preprocessed face images in the GANs doc

parent bc17c6a2
No related branches found
No related tags found
No related merge requests found
Pipeline #26052 canceled
...@@ -48,10 +48,10 @@ network definition: ...@@ -48,10 +48,10 @@ network definition:
from bob.learn.pytorch.datasets import Normalize from bob.learn.pytorch.datasets import Normalize
import torchvision.transforms as transforms import torchvision.transforms as transforms
dataset = MultiPIEDataset(root_dir='/idiap/temp/heusch/data/multipie-cropped-64x64', dataset = MultiPIEDataset(root_dir='path/to/multipie/data',
frontal_only=False, frontal_only=False,
transform=transforms.Compose([ transform=transforms.Compose([
RollChannels(), # bob to skimage: RollChannels(),
ToTensor(), ToTensor(),
Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)) Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
]) ])
...@@ -72,7 +72,9 @@ network definition: ...@@ -72,7 +72,9 @@ network definition:
.. note:: .. note::
You should have the ``bob.db.multipie`` package installed on your environment You should have the ``bob.db.multipie`` package installed on your environment. Note also
that this model acts on color images of face of size 64x64. It's up to you to preprocess
your data to make them fit these constraints ...
To train the conditional GAN to generate faces with different poses, you should execute:: To train the conditional GAN to generate faces with different poses, you should execute::
......
...@@ -53,7 +53,9 @@ file. The configuration file should be as follow: ...@@ -53,7 +53,9 @@ file. The configuration file should be as follow:
.. note:: .. note::
You should have the ``bob.db.multipie`` package installed on your environment You should have the ``bob.db.multipie`` package installed on your environment. Note also
that this model acts on color images of face of size 64x64. It's up to you to preprocess
your data to make them fit these constraints ...
Once your configuration file is done. You can learn a model to generate Once your configuration file is done. You can learn a model to generate
frontal face images by invoking the following script:: frontal face images by invoking the following script::
...@@ -87,6 +89,4 @@ Here are some examples of saved images. ...@@ -87,6 +89,4 @@ Here are some examples of saved images.
After 20 epoch After 20 epoch
.. todo:: script that samples from the model
.. [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>`__ .. [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>`__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment