Neural Style Transfer using VGG19.
Original paper link.
VGG19 weights from torchvision.
pip install nst_vgg19nst photo.jpg --style style-image.png --output result.png
from nst_vgg19 import NST_VGG19
# images must be Numpy arrays. Use np.array(pil_image)
style_image = load_image('style.png')
content_image_1 = load_image('img1.jpg')
content_image_2 = load_image('img2.png')
nst = NST_VGG19(style_image)
result_1 = nst(content_image_1)
result_2 = nst(content_image_2)