Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sunnyHelen opened this issue May 5, 2019 · 1 comment
Open

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

sunnyHelen opened this issue May 5, 2019 · 1 comment

Comments

@sunnyHelen
Copy link

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
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants