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

CUT is not working with grayscale images. #173

Open
AlbertoJBC opened this issue Sep 25, 2023 · 2 comments
Open

CUT is not working with grayscale images. #173

AlbertoJBC opened this issue Sep 25, 2023 · 2 comments

Comments

@AlbertoJBC
Copy link

Hi!
I was trying to execute CUT for domain adaptation in grayscale images but, at the time the models are created, an error raises telling that the input has 3 channels instead of 1 (as specified in options with input_nc=1). I took a look to the code and I think I found the source of this bug. It seems that, when an unaligned dataset is created, the images are converted to RGB and, then, the necessary transforms are applied. However, the function get_transform() never changes its argument 'grayscale' from the default (False), depending on the specified input_nc option, so it never returns images with only 1 channel and they always remain having 3 channels.
This is my first time submitting an issue to GitHub, so I am not sure about what to do if I think I know the source of the error, my apologies for that. Maybe this bug should be reviewed by some administrator. I hope I could help! Thank you.

@YoungLintao
Copy link

Yes, I'm having the same problem, after I change the input&output_nc to 1 it still reports an error mentioning that the training block size is inconsistent.(I can make sure my images are 8 bit)

@7W7W7W
Copy link

7W7W7W commented Jan 29, 2024

CUT can not run unaligned dataset?

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