We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi all,
In BasicSR, we can add the 'color: y' option to the .YAML file to train with y_only grayscale image. For instance:
datasets: train: name: DIV2K type: PairedImageDataset color: y
However, RealESRGANDataset do not provide this option, so that I tried to modify myself in RealESRGANDataset like this before function return:
**img_gt = bgr2ycbcr(img_gt, y_only=True)[..., None]** img_gt = img2tensor([img_gt], bgr2rgb=True, float32=True)[0] kernel = torch.FloatTensor(kernel) kernel2 = torch.FloatTensor(kernel2)
But still report an error in realesrnet_model.py
line102 : "Input image tensor permitted channel values are [3], but found 1" out = random_add_poisson_noise_pt( out, scale_range=self.opt['poisson_scale_range'], gray_prob=gray_noise_prob, clip=True, rounds=False)
Anyone can help please?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi all,
In BasicSR, we can add the 'color: y' option to the .YAML file to train with y_only grayscale image.
For instance:
datasets:
train:
name: DIV2K
type: PairedImageDataset
color: y
However, RealESRGANDataset do not provide this option, so that I tried to modify myself in RealESRGANDataset like this before function return:
But still report an error in realesrnet_model.py
line102 : "Input image tensor permitted channel values are [3], but found 1"
out = random_add_poisson_noise_pt(
out,
scale_range=self.opt['poisson_scale_range'],
gray_prob=gray_noise_prob,
clip=True,
rounds=False)
Anyone can help please?
The text was updated successfully, but these errors were encountered: