microsoft / CoCosNet

Cross-domain Correspondence Learning for Exemplar-based Image Translation. (CVPR 2020 Oral)
MIT License
398 stars 45 forks source link

demo for makeup transfer? #4

Closed puppet101 closed 4 years ago

puppet101 commented 4 years ago

Hi, do you have any plan to release the code for makeup transfer? Or could you please explain the implementations in detail? Thank you!

panzhang0212 commented 4 years ago

Hi, for detail of makeup transfer. 1.need a makeup layer image for source face. we use photoshop to get makeup layer image. This is the makeup image of figure 11 in our paper. 2127 2.warp the makeup layer image by learnt dense correspondence between source face image(as exemplar) and target face image(edge, as input). https://github.com/microsoft/CoCosNet/blob/3db703a46f9969836037427e190ede8480c07ce1/models/networks/correspondence.py#L307 is learnt correspondence. The warping code: image self.makeup is your orignial makeup layer image. 3.after getting warped makeup layer image, blend it with target face and get final output from blend_modes import multiply multiply(target_face, makeup, 1)

puppet101 commented 4 years ago

Thank you very much! I will have a try.

mlxht990720 commented 3 years ago

Hi! I'm a beginner, I can't understand where the warping code should be added and how to get final output , could you please tell me more?