limingcv / Photorealistic-Style-Transfer

High-Resolution Network for Photorealistic Style Transfer
MIT License
204 stars 44 forks source link

Can I use a grayscale image as the style image? #3

Open sunnyHelen opened 5 years ago

sunnyHelen commented 5 years ago

Can I use a grayscale image as the style image? There seems to be a channel problem. Do you know how to deal with it? Thank you for your help~

KushajveerSingh commented 5 years ago

You will have to convert your grayscale image to 3D image as VGG takes 3 channel image as input. Also, you will have to change this line in utils.py img = transform(img)[:3, :, :].unsqueeze(0)