-
Notifications
You must be signed in to change notification settings - Fork 136
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
Grayscale dataset #38
Comments
@Elwarfalli You may directly input the gray images without any change and you would get "gray images" with three channels. Then you may simply convert the three-channel images to one-channel ones. |
When I applied that where the input is grayscale and I tested my pre-trained model the results were saved in 3 channels of grayscale. I am curious about PSNR; has PSNR computed for one grayscale channel? or how? and how can I change the code to save the results on a one-channel grayscale? Thank you for your fast reply, |
@Elwarfalli PSNR is comupted on Y channel in the default settings. If you want to compute PSNR for comparing models on gray images, the best way is to retrain a model for gray images by setting the channel as 1 for complete fairness. If you just want to see the results of pretrained model on gray images, the most convenient way is to wirte a post-processing script to convert the three-channel images into gray channel like using Opencv BGR2Gray, and then compute PSNR on the one-channel images. |
Thank you, |
When I set the parameter as follows: network structuresnetwork_g: I got an error:
File "C:\Users\Student.conda\envs\hat\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl Any help, please? Thank you, |
@Elwarfalli You need modify the data loader for 1-channel images I/O. Create a custom data loader referring to paired_image_dataset.py. |
Based on my understating, BasicSR paired_image_dataset.py papers the dataset. I have my own grayscale dataset training/validation. |
@Elwarfalli I mean you need to create your own data loader to fit your dataset. Read this file just as the reference. |
I'd like to ask about your great work.
Is it possible to run it on a grayscale dataset? If so what should I change?
I changed a number of input channels but it is not working for me.
network structuresnetwork_g:
type: HAT
upscale: 3
in_chans: 1
I am looking forward to hearing back from you.
Thank you,
The text was updated successfully, but these errors were encountered: