yumingj / Talk-to-Edit

Code for Talk-to-Edit (ICCV2021). Paper: Talk-to-Edit: Fine-Grained Facial Editing via Dialog.
https://www.mmlab-ntu.com/project/talkedit/
340 stars 48 forks source link

Not working on real images #3

Closed royaloctave closed 2 years ago

royaloctave commented 3 years ago

Thank you for the great work. I'm currently trying to use "editting_wo_dialog" on real images but the algorithm doesn't produce the results! I use exactly the same setting and models you provided. I just only change the input image. I get the following message at the end:

2021-10-25 12:42:50,212.212 - INFO: Sample 000 is already at the target class, skip.
2021-10-25 12:42:50,212.212 - INFO: This attribute is already at the degree that you want. Let's try a different attribute degree or another attribute.

sometimes it also gives something like this:

total: 0.2573; perceptual: 0.2314; mse: 0.0259; lr: 0.0000: 100%|█| 600/600 [00:59<00:00, 10
2021-10-25 12:40:12,199.199 - INFO: Sorry, we are unable to edit this attribute. Perhaps we can try something else.

Here I upload the input and output for your reference. 3

cropped start_image

How can I run the code properly on real images?

royaloctave commented 3 years ago

Now I tried another cropped image (only head not entire body). I don't get those messages anymore but still doesn't produce the edited images correctly! Here I attach the input and generated images.

input start_image (1) edit_order_0_000_num_edits_1_class_0_attr_idx_0 edit_order_0_000_num_edits_2_class_5_attr_idx_0

yumingj commented 3 years ago

Hi, thanks for your interest in our work.

I tried to test with the two images you provided and got the same results.

I found that it is because the face detector cannot find the face accurately and the cropped images are wierd. For 1024 resolution, we borrow the face cropping code from here. And I also tried to crop the image using their code, and I got the same result. I am so sorry I didn't have enough time to revise the code temporarily. I will check the problem later and I will post the solution here if I have any updates.

You can try to use the algorithm for faces with a resolution of 128 x 128. You can change the img_res to 128. I have tested and it worked if the resolution is changed to 128.

royaloctave commented 3 years ago

Thank you for the quick reply. I will try it with res 128. Looking forward to the updates.

zhanghm1995 commented 3 years ago

@royaloctave, Hi, I also got the similar results and messages like yours when I test the real image. I want to know whether you have get the expected results when changing resolution to 128?

And what the config file you used? Have you modified anything?