Open Michaelwhite34 opened 2 years ago
The scaling in face_enhancement.py is optional. I did it to better detect the faces due to the faces in the original images are too small.
If you want to combine a super-resolution method with GPEN, I suggest the following steps:
The last step can be readily achieved by reformulating img = cv2.convertScaleAbs(img*(1-full_mask) + full_img*full_mask)
in face_enhancement.py to img = cv12.convertScaleAbs(img_sr*(1-full_mask) + full_img*full_mask)
.
I will update a combined version soon.
The scaling in face_enhancement.py is optional. I did it to better detect the faces due to the faces in the original images are too small.
If you want to combine a super-resolution method with GPEN, I suggest the following steps:
- employing the SR method on the original image to get SR result;
- resizing the original image to the size of the SR output;
- performing GPEN on the resized original image;
- pasting enhanced faces back to the SR result.
The last step can be readily achieved by reformulating
img = cv2.convertScaleAbs(img*(1-full_mask) + full_img*full_mask)
in face_enhancement.py toimg = cv12.convertScaleAbs(img_sr*(1-full_mask) + full_img*full_mask)
.I will update a combined version soon.
Thanks for the reply, where can I disable the scaling ?
I have integrated SR with GPEN. Please have a try.
I have integrated SR with GPEN. Please have a try.
It works fine.A question tho,can we super-resolution multiple times and apply the face image.Suppose I have a 500500 photo and I want to super-resolution 2 times to get 20002000.
Also,I notice that there will always be "face detail" on noisy photos.When the training comes out,will it be easier to train a model that generates cleaner and soft face like remini ?
I have integrated SR with GPEN. Please have a try.
Hello, I think the code on Colab needs an update after this change, i get this error: "FileNotFoundError: [Errno 2] No such file or directory: './weights/rrdb_realesrnet_psnr.pth'"
After manually loading the file into Colab, I get this error:
"ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 1136 and the array at index 1 has size 2272"
Thank you.
I have integrated SR with GPEN. Please have a try.
Hello, I think the code on Colab needs an update after this change, i get this error: "FileNotFoundError: [Errno 2] No such file or directory: './weights/rrdb_realesrnet_psnr.pth'"
After manually loading the file into Colab, I get this error:
"ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 1136 and the array at index 1 has size 2272"
Thank you.
updated.
Also,I notice that there will always be "face detail" on noisy photos.When the training comes out,will it be easier to train a model that generates cleaner and soft face like remini ?
did you find anything that comes closer to remini? @Michaelwhite34
Also,I notice that there will always be "face detail" on noisy photos.When the training comes out,will it be easier to train a model that generates cleaner and soft face like remini ?
did you find anything that comes closer to remini? @Michaelwhite34
At this point I would say gpen is as good as remini as long as your input is not messed up like small size gifs.If you use cleaner dataset to train gpen, it will look closer to remini.
@Michaelwhite34 have yet to try gpen but uptill now GFPGAN gives the best results in comparison with remini , also heard about DFDNet but not yet implementaed
@Michaelwhite34 have yet to try gpen but uptill now GFPGAN gives the best results in comparison with remini , also heard about DFDNet but not yet implementaed
I tried all these,gpen is still best.GFPgan is too sharp,DFDNet is not high quality enough.GFPgan V1.3 model is softer,the result face will be cleaner(Here I mean some detail will be lost,the skin looks softer,the identity changes a bit,like different eye color,wipe out hair fly away).
@Michaelwhite34 that is very interesting saves me the time, thanks for the insight
@Michaelwhite34 can you please share the GPEN-BFR-2048 pretrained model as its been taken down
@Michaelwhite34 can you please share the GPEN-BFR-2048 pretrained model as its been taken down
That's weird,you can ask the author why it was taken down ? Never mind,I saw commerical reasons.
yes, can you send the file at my email, haiderasadbhutta@gmail.com @Michaelwhite34
@Michaelwhite34 can you please share the GPEN-BFR-2048 pretrained model as its been taken down
That's weird,you can ask the author why it was taken down ? Never mind,I saw commerical reasons.
yes, can you send the file at my email, haiderasadbhutta@gmail.com @Michaelwhite34
could you share it with me?
elena7gzz@gmail.com
@Michaelwhite34 @farasas @haiderasad
If you have GPEN-BFR-2048 checkpoint, can you share it to me also? Please save me. bbchip13@gmail.com
Hi, could you share me the model by email too please? @farasas @BbChip0103 @Michaelwhite34
tumelinyannis@gmail.com
@Michaelwhite34 @farasas @haiderasad
If you have GPEN-BFR-2048 and GPEN-BFR-1024 checkpoint, can you share it to me also? Please save me. dongdk.sysu@foxmail.com
Suppose I have a folder of enhanced images of the same name, how to just paste enhanced face to these images without scaling original images ?