-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Output of Codeformer is a black image #222
Comments
Same problem. Is there anyone have a solution??? |
is there “Grayscale input:True” in your process log? |
Got the same problem here and after dig deeper I think I found the reason for the failure and a fix. The problem comes from the line 368 of After this line, I confirmed this by added a few debug lines around the questioned code:
And got below output, you can see that the two face image value exceed 256.
The fix is to just normalize the values in
While this fixes the problem, I still don't understand why do we need to transfer color to a grayscale image, what's the purpose? and why the resulted values exceed 8-bit image max? |
So based on my very limited knowledge of image processing, the I have added code to reduce the contrast when this happens to ensure pixel values are all within the valid range. Here is the updaated
|
More polished code to guarantee clamping the pixel values to bit range.
|
Hi everyone, Ive encountered some problem when trying the google collab version of the codeformer demo. It seems fine for some images, but I've found out that there are some image whose output will generate all black pixel.
p.s. I didnt change any code from the current google collab.
Does anyone have the same issues? Thanks for all you guys help
This is the image with the output. the image on the left side doesnt have any white box, i just added those box to ask this problem
The text was updated successfully, but these errors were encountered: