Last active
August 8, 2020 19:40
-
-
Save ucalyptus2/3d6fccc0abcc7e63703b4088efebdd5a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import fastai | |
from deoldify.visualize import * | |
import warnings | |
warnings.filterwarnings("ignore", category=UserWarning, message=".*?Your .*? set is empty.*?") |
This file contains hidden or 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
colorizer = get_image_colorizer(artistic=True) |
This file contains hidden or 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
source_url = 'https://i.guim.co.uk/img/media/3b24aa6da654484f8bdd4503b13b221d9f33b5d4/0_189_1892_1134/master/1892.jpg?width=1140&quality=85&auto=format&fit=max&s=58c31007e91ac090f34bd5f59b827895' #@param {type:"string"} | |
render_factor = 35 #@param {type: "slider", min: 7, max: 40} | |
watermarked = False #@param {type:"boolean"} | |
if source_url is not None and source_url !='': | |
image_path = colorizer.plot_transformed_image_from_url(url=source_url, render_factor=render_factor, compare=True, watermarked=watermarked) | |
else: | |
print('Provide an image url and try again.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment