Skip to content

Commit

Permalink
Minor fixes to readme and assert message, RGB not RGBA semantic maps …
Browse files Browse the repository at this point in the history
…for consistency.
  • Loading branch information
alexjc committed Mar 8, 2016
1 parent 2cfa409 commit dc10503
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ The ``doodle.py`` script generates an image by using three or four images as inp
Image Analogy
-------------

The algorithm is built for style transfer, but can also generate image analogies that we call a ``#NeuralDoodle``. Example files are included in the ``#/samples/`` folder. Execute with these commands:
The algorithm is built for style transfer, but can also generate image analogies that we call a ``#NeuralDoodle``; use the hashtag if you post your images! Example files are included in the ``#/samples/`` folder. Execute with these commands:

.. code:: bash
# Synthesize a coastline as if painted by Monet. This uses "*_sem.png" masks for both images.
python3 doodle.py --device=cpu --style samples/Monet.jpg --output samples/Coastline.jpg
python3 doodle.py --device=cpu --style samples/Monet.jpg --output samples/Coastline.png
# Generate a scene around a lake in the style of a Renoir painting.
python3 doodle.py --device=gpu0 --style samples/Renoir.jpg --output samples/Landscape.jpg
python3 doodle.py --device=gpu0 --style samples/Renoir.jpg --output samples/Landscape.png
Note the ``--device`` argument that lets you specify which GPU or CPU to use. The default is to use ``cpu``, if you have NVIDIA card setup with CUDA/CUDNN already try ``gpu0``.

Expand Down
2 changes: 1 addition & 1 deletion doodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def __init__(self):
args.content_weight = 0.0

assert self.content_map_original.shape[2] == self.style_map_original.shape[2],\
"Mismatch in number of channels for style and content semantic map.s"
"Mismatch in number of channels for style and content semantic map."

def load_images(self, name, filename):
"""If the image and map files exist, load them. Otherwise they'll be set to default values later.
Expand Down
Binary file modified samples/Landscape_sem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dc10503

Please sign in to comment.