VinAIResearch / CPM

💄 Lipstick ain't enough: Beyond Color-Matching for In-the-Wild Makeup Transfer (CVPR 2021)
https://thaoshibe.github.io/CPM
Apache License 2.0
367 stars 58 forks source link

Can you publish data preprocessing code? #7

Closed bladenow closed 3 years ago

bladenow commented 3 years ago

Thank you very much for your great work! Can you publish data preprocessing code? Is there no code to extract the mask or I missed it

thaoshibe commented 3 years ago

Thanks for your interest! (🖒^^)🖒 To be clear, could you provide more details about the "mask"? (Eg: facial segmentation, UV-map-segmentation, etc.). Without further information, I'm not sure I can address your question properly.


But in general, I hope you're looking for "one of these masks": facial segmentation or UV-segmentation

Facial Segmentation

To get facial segmentation, I used [face-parsing.Pytorch]

facial-segmentation

_(Face-parsing will give you facial attributes such as upper lip, lower lip, left eye, right eye, hair, etc. Check here for details)_

P.s: Existing makeup datasets (LADN, BeautyGAN) already have facial segmentation within them.

UV map segmentation

Check how to get "respective UV-map texture of each image and its segmentation mask", section 2 - Get UV texture (To be specific, uv_seg is what you need) https://github.com/VinAIResearch/CPM/blob/315b89dc8bef70fde99fdf4c7b3f35e9c8c2e461/Color/create_beautygan_uv.py#L51


Glad to help! ᕦ( ͡° ͜ʖ ͡°)ᕤ

bladenow commented 3 years ago

Thank you very much for your reply so soon. SEGS directory, with what code?

segs | makeup |__ non-makeup

thaoshibe commented 3 years ago

Hello, which dataset you're talking about? CPM-Synt-1, CPM-Synt-2, or Makeup Transfer Dataset? Pls check here .

bladenow commented 3 years ago

Makeup Transfer Datase

thaoshibe commented 3 years ago

Oh I think you're talking about Makeup Transfer Dataset (published with BeautyGAN paper). They already provided facial segmentation masks!

In their paper, they said that they used PSPNet. Please check in their paper.

For me, I recommend using face-parsing.Pytorch. Please check!

bladenow commented 3 years ago

Thank you very much!!!