ajbrock / Neural-Photo-Editor

A simple interface for editing natural photos with generative neural networks.
MIT License
2.08k stars 197 forks source link

IDEA: Option to save changed image as the new ground-truth image #7

Closed michaelrgb closed 7 years ago

michaelrgb commented 7 years ago

I was trying to make multiple independent changes to an image and I came to the following conclusion:

The masking technique means the output image is based off the original ground-truth image. After an aesthetically pleasing change is made, such as growing the length of the hair, a new ground-truth image must be saved and the latent space recalculated before a different change is made such as changing the hair color.

By adding the following PR I was able to get these results: https://github.com/ajbrock/Neural-Photo-Editor/pull/8

Original image: original

First operation - increase hair length: longerhair

Second operation AFTER saving the new ground-truth image - new hair color: newhaircolor

Without saving the new ground-truth image, I was unable to get these results as the algorithm attempted to remove my longer black hair when I attempted to change it to yellow, because it matches the skin color.

ajbrock commented 7 years ago

I like the idea--want to make this a pull request? I'll take a look at it and likely integrate it in as an option. It's starting to look like there's going to be a fairly large number of buttons, so I'm considering looking into a menu or dropdown menu of some sort.

michaelrgb commented 7 years ago

Thanks, linked to a PR.

ajbrock commented 7 years ago

PR accepted. Thanks for the add, great idea! I changed the button name to "Update," which I now realize may be a bit confusing what with "Reset" and "Infer" already being there (with "Reset" returning to the current ground truth and "Infer" re-inferring from an original image), so I'll take a look into coming up with better names soon.