Is this possible, to improve? #33

Open
opened 2026-01-29 21:38:40 +00:00 by claunia · 10 comments
Owner

Originally created by @zelenooki87 on GitHub (Jul 24, 2021).

It would be great if in some of next releases, code will be optimised for whole area of image denoising/deartifact/deblur, like as it is now in square around faces....
thank you dev for hard work!

Originally created by @zelenooki87 on GitHub (Jul 24, 2021). It would be great if in some of next releases, code will be optimised for whole area of image denoising/deartifact/deblur, like as it is now in square around faces.... thank you dev for hard work!
Author
Owner

@xinntao commented on GitHub (Jul 25, 2021):

@zelenooki87 Thanks for your suggestion.
We will improve it, but it will take some time~

@xinntao commented on GitHub (Jul 25, 2021): @zelenooki87 Thanks for your suggestion. We will improve it, but it will take some time~
Author
Owner

@zelenooki87 commented on GitHub (Aug 8, 2021):

Thank you for improving your code. Respect!
On some of photos if persons are too far and not clear, there are very strange results....could you make minor changes to code to choose which faces are included in final results? like reproduce same image again without strange faces manually....i will upload some strange results if there is need to....Also, do you suggest to use upscale software(real esrgan, or commercial solutions like gigapixel ai) prior or after using gfpgan?
on >90% results are great! thank you

@zelenooki87 commented on GitHub (Aug 8, 2021): Thank you for improving your code. Respect! On some of photos if persons are too far and not clear, there are very strange results....could you make minor changes to code to choose which faces are included in final results? like reproduce same image again without strange faces manually....i will upload some strange results if there is need to....Also, do you suggest to use upscale software(real esrgan, or commercial solutions like gigapixel ai) prior or after using gfpgan? on >90% results are great! thank you
Author
Owner

@xinntao commented on GitHub (Aug 8, 2021):

@zelenooki87

It would be great if you could upload those strange results :-)

I have just updated GFPGAN, which support using Real-ESRGAN to enhance the background (non-face) regions. You may have a try. The colab demo has also been updated: https://colab.research.google.com/drive/1sVsoBd9AjckIXThgtZhGrHRfFI6UUYOo

@xinntao commented on GitHub (Aug 8, 2021): @zelenooki87 It would be great if you could upload those strange results :-) I have just updated GFPGAN, which support using Real-ESRGAN to enhance the background (non-face) regions. You may have a try. The colab demo has also been updated: https://colab.research.google.com/drive/1sVsoBd9AjckIXThgtZhGrHRfFI6UUYOo
Author
Owner

@zelenooki87 commented on GitHub (Aug 14, 2021):

Thats great. results are now better. however, due cuda out of memory error, for 10-25MPx resolutions, I am using Gigapixel Ai to upscale photos on PC ... Modified code to not upscale with esrgan which is default now, because of cuda error.. With RTX 3060 12GB I am able to inference GFPGAN at 36-40 MPx resolution on Windows.. results are much, much better when code is used properly upscaled and denoised/sharpened photos....

On few number of photos I noticed third eye or even onother mouth added.... mostly on baby faces
like this....
https://i.postimg.cc/d30nLSjc/0009-gigapixel-standard-width-4954px-Sharpen-AI-focus-00.png

I am sure that with time model will be updated. Keep this project live man. All the best!

@zelenooki87 commented on GitHub (Aug 14, 2021): Thats great. results are now better. however, due cuda out of memory error, for 10-25MPx resolutions, I am using Gigapixel Ai to upscale photos on PC ... Modified code to not upscale with esrgan which is default now, because of cuda error.. With RTX 3060 12GB I am able to inference GFPGAN at 36-40 MPx resolution on Windows.. results are much, much better when code is used properly upscaled and denoised/sharpened photos.... On few number of photos I noticed third eye or even onother mouth added.... mostly on baby faces like this.... https://i.postimg.cc/d30nLSjc/0009-gigapixel-standard-width-4954px-Sharpen-AI-focus-00.png I am sure that with time model will be updated. Keep this project live man. All the best!
Author
Owner

@xinntao commented on GitHub (Aug 18, 2021):

@zelenooki87

  1. For the cuda out-of-memory issue, you can set --bg_tile option
  2. Could you please provide the whole image for https://i.postimg.cc/d30nLSjc/0009-gigapixel-standard-width-4954px-Sharpen-AI-focus-00.png
    It seems that there is something wrong in face crop.
@xinntao commented on GitHub (Aug 18, 2021): @zelenooki87 1. For the cuda out-of-memory issue, you can set `--bg_tile` option 2. Could you please provide the whole image for https://i.postimg.cc/d30nLSjc/0009-gigapixel-standard-width-4954px-Sharpen-AI-focus-00.png It seems that there is something wrong in face crop.
Author
Owner

@zelenooki87 commented on GitHub (Sep 10, 2021):

Another example cropped upscale with real esrgan 4x with face enhance option image

And crop from original photo
image

I must say with every new release of code and updated pypi packages from requirements file(real esrgan gfpgan, basicsr and facelib) results are better. results are even now far better than when upscale with latest Gigapixel AI prior. they messed things whith every new version their models seems to be less quality. But back on topic, I suggest you if you can modify code if face area is too small or blur that then model not generate output(for example 64px and less) like in this example. Cause results are not excepted... I will upload more examples if you need

Big support to you for great work and release code for free to public, good man!

@zelenooki87 commented on GitHub (Sep 10, 2021): Another example cropped upscale with real esrgan 4x with face enhance option ![image](https://user-images.githubusercontent.com/75204635/132872252-112e0643-1c9b-40a2-a643-6ffb9f413b57.png) And crop from original photo ![image](https://user-images.githubusercontent.com/75204635/132873182-b948e5e1-fd1a-4f7d-97a2-13648d8c5786.png) I must say with every new release of code and updated pypi packages from requirements file(real esrgan gfpgan, basicsr and facelib) results are better. results are even now far better than when upscale with latest Gigapixel AI prior. they messed things whith every new version their models seems to be less quality. But back on topic, I suggest you if you can modify code if face area is too small or blur that then model not generate output(for example 64px and less) like in this example. Cause results are not excepted... I will upload more examples if you need Big support to you for great work and release code for free to public, good man!
Author
Owner

@xinntao commented on GitHub (Sep 10, 2021):

Thanks 👍

Your suggestion is good.
I updated a version of facexlib, which removes too small faces or side faces, for failure cases as you provided. More details: 24493fc888

But it may be not perfect, as it now hard-codes the eye-to-eye distance as a threshold.
I will update it later, and will also consider your suggestion that modify code if face area is too small or blur that then model not generate output.

Thanks

@xinntao commented on GitHub (Sep 10, 2021): Thanks 👍 Your suggestion is good. I updated a version of facexlib, which removes too small faces or side faces, for failure cases as you provided. More details: https://github.com/xinntao/facexlib/commit/24493fc888acb03ca627ed07cd75376ab56c85bc But it may be not perfect, as it now hard-codes the eye-to-eye distance as a threshold. I will update it later, and will also consider your suggestion that `modify code if face area is too small or blur that then model not generate output`. Thanks
Author
Owner

@zelenooki87 commented on GitHub (Sep 10, 2021):

example from previous post was with freshly anaconda environment with installed strictly most recent version from https://pypi.org/ argumented with == during adding to env.
packages are:
--conda list
https://pastebin.com/dCNZQNYB

Will constantly check your repositories for updates.... and update them all in new environment. My galery contains around 11k of family photos, from low resolutions like old cell phone captured 640x480pixel to 24Mpx DSLR. And lot of scanned photos. Will inform you if output images has unexpected results.

@zelenooki87 commented on GitHub (Sep 10, 2021): example from previous post was with freshly anaconda environment with installed strictly most recent version from https://pypi.org/ argumented with == during adding to env. packages are: --conda list https://pastebin.com/dCNZQNYB Will constantly check your repositories for updates.... and update them all in new environment. My galery contains around 11k of family photos, from low resolutions like old cell phone captured 640x480pixel to 24Mpx DSLR. And lot of scanned photos. Will inform you if output images has unexpected results.
Author
Owner

@xinntao commented on GitHub (Sep 17, 2021):

@zelenooki87 Thanks:-)

So many family photos. You have a warm and loving family 😃

@xinntao commented on GitHub (Sep 17, 2021): @zelenooki87 Thanks:-) So many family photos. You have a warm and loving family 😃
Author
Owner

@zelenooki87 commented on GitHub (Feb 14, 2022):

You have updated code and models. I am getting much more natural results with 1.3 model. Will test further and report on eventual problems. This project is really amazing.

@zelenooki87 commented on GitHub (Feb 14, 2022): You have updated code and models. I am getting much more natural results with 1.3 model. Will test further and report on eventual problems. This project is really amazing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#33