Created
January 8, 2018 11:35
-
-
Save ArnoutDevos/84d5e1d3c93e781bae71d0c900292bb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_noise_image(content_image, noise_ratio): | |
noise_image = np.random.randn(IMAGE_HEIGHT, IMAGE_WIDTH, COLOR_CHANNELS) | |
#Take a weighted average of the values | |
gen_image = noise_image * noise_ratio + content_image * (1.0 - noise_ratio) | |
return gen_image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment