Skip to content

Latest commit

 

History

History
151 lines (122 loc) · 8.13 KB

pystiche_papers.gatys_et_al_2017.rst

File metadata and controls

151 lines (122 loc) · 8.13 KB

pystiche_papers.gatys_et_al_2017

Title Controlling Perceptual Factors in Neural Style Transfer
Authors

Leon A. Gatys, Alexander. S. Ecker, Matthias Bethge,

Aaron Hertzmann, and Eli Shechtman

Citation :cite:`GEB+2017`
Reference implementation Repository / Archive
Variant Image optimization
Content loss :class:`~pystiche.loss.FeatureReconstructionLoss`
Style loss :class:`~pystiche.loss.GramLoss`

Behavioral changes

.. seealso::
  :ref:`Paper implementations <impl_params>`

The following parts are affected:

Hyper parameters

Parameter impl_params
True False
layer "relu4_2" "conv4_2"
score_weight 1e0
Parameter impl_params
True False
layers ("relu1_1", "relu2_1", "relu3_1", "relu4_1", "relu5_1") ("conv1_1", "conv2_1", "conv3_1", "conv4_1", "conv5_1")
layer_weights (2.4e-04, 6.1e-05, 1.5e-05, 3.8e-06, 3.8e-06) [1]
score_weight 1e3 [1]
Parameter impl_params
True False
layers ("relu1_1", "relu2_1", "relu3_1", "relu4_1", "relu5_1") ("conv1_1", "conv2_1", "conv3_1", "conv4_1", "conv5_1")
layer_weights (2.4e-04, 6.1e-05, 1.5e-05, 3.8e-06, 3.8e-06) [1] [2]
region_weights   "sum"
score_weight 1e3 [1]
Parameter impl_params
True False
edge_sizes (500, 1024) [3] (512, 1024)
num_steps [4] (500, 200)
[1](1, 2, 3, 4) The values are reported in the supplementary material.
[2]The layer_weights are computed by 1 / n^2 where n denotes the number of channels of a feature map from the corresponding layer in the :func:`~pystiche_papers.gatys_et_al_2017.multi_layer_encoder`.
[3]The paper only reports the edge_size for the low resolution.
[4]The paper only reports the ratio. i.e. 500 / 200 = 2.5 of num_steps.

API

.. automodule:: pystiche_papers.gatys_et_al_2017

.. autofunction:: images

.. autofunction:: content_loss
.. autoclass:: MultiLayerEncodingLoss
.. autofunction:: style_loss
.. autofunction:: guided_style_loss
.. autofunction:: perceptual_loss
.. autofunction:: guided_perceptual_loss

.. autofunction:: nst
.. autofunction:: guided_nst

.. autofunction:: image_pyramid

.. autofunction:: preprocessor
.. autofunction:: postprocessor
.. autofunction:: multi_layer_encoder
.. autofunction:: optimizer
.. autofunction:: compute_layer_weights
.. autofunction:: hyper_parameters