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

Generate images from a grayscale trained pkl file #89

Open
velamini opened this issue Nov 23, 2021 · 2 comments
Open

Generate images from a grayscale trained pkl file #89

velamini opened this issue Nov 23, 2021 · 2 comments

Comments

@velamini
Copy link

Hello, I have trained using a 100 set of grayscale images, now I am stuck in the generate.py because it is all set for generating RGB images.
I get this error:

ValueError: not enough image data

or when I changed the generate.py archive from RGB to L :

ValueError: Too many dimensions: 3 > 2.

I have searched the internet for hours and tried a lot of stuff but I am pretty new to python so I have run out of ideas of what I need to change in the generate.py to be able to have the images, can somebody please help me?

@sue-up
Copy link

sue-up commented Jan 28, 2022

Please make the following changes:

  1. img.permute(0, 2, 3, 1) ---> img.permute(0, 1, 2, 3)
  2. img[0] ---> img[0][0]
  3. "RGB" ---> "L"

@shibbit
Copy link

shibbit commented May 12, 2022

Please make the following changes:

  1. img.permute(0, 2, 3, 1) ---> img.permute(0, 1, 2, 3)
  2. img[0] ---> img[0][0]
  3. "RGB" ---> "L"

You are very helpful, thank you.

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

3 participants