pystiche / papers

Reference implementation and replication of prominent NST papers
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

NST starting point for li_wand_2016 #227

Closed pmeier closed 3 years ago

pmeier commented 3 years ago

Right now the starting point is hard coded to

https://github.com/pmeier/pystiche_papers/blob/04e8e3598939679b9c9963a7c1a1b48899f30b97/pystiche_papers/li_wand_2016/_nst.py#L63-L65

This is wrong since the paper states

[The input image] is initialized as random noise

The reference implementation does not set a default. For the predefined runs the starting point is the content_image (see third parameter 'image').

How do we want to handle this?

  1. starting_point = "random" or
  2. starting_point = "content" if impl_params else "random"

Cc @jbueltemeier

jbueltemeier commented 3 years ago

Since there is no default for this parameter in the reference implementation and all examples are executed with "content", I would prefer the second variant.

starting_point = "content" if impl_params else "random"

pmeier commented 3 years ago

The problem is that the parameters for the four predefined runs differ from the default parameters. Thus, even now, we have a discrepancy between the parameters used in the replication

https://github.com/pmeier/pystiche_papers/blob/04e8e3598939679b9c9963a7c1a1b48899f30b97/replication/li_wand_2016/main.py#L32-L34

and the default values

https://github.com/pmeier/pystiche_papers/blob/04e8e3598939679b9c9963a7c1a1b48899f30b97/pystiche_papers/li_wand_2016/_loss.py#L187-L192

I'm inclined to set starting_point="random" by default and simply switch this to starting_point="content" for the replication. Thoughts?