sicxu/Deep3dPortrait

Do you have pre-trained models for face segmentation

cravisjan97 opened this issue · 4 comments

I noticed that in the README, you mentioned the ROI-tanh work (https://github.com/Eskender-B/roi-tanh). But their repository does not have any links to their pre-trained models for face segmentation. Is it possible for you to share your pre-trained models for face segmentation?

Thanks in advance!

sicxu commented
  1. The repo you mentioned is not an offical implementation.
  2. Sorry, we can not share our pre-trained face segmentation model. You may implement it following Lin et al.'s paper.
  3. For #7 , there are two ways to obtain the segmentation masks aligned with raw image. You can feed the cropped image to the segmentation network and realign the results with raw images. Or, you can follow Lin et al.'s method as we do. They applied a tanh-warping for input images. For more details please refer to their paper.

For #7 you mentioned realigning the results with raw images. Are there any algorithms to do this?

sicxu commented

Since we applied a transform to obtain the cropped image, we can easily apply the corresponding inverse transform to the cropped image/mask to restore the original image. Anyway, I have uploaded a simple func for your purpose.

def realign(img, crop_param, raw_w, raw_h, interpolation, crop_h=256, crop_w=256):

@sicxu Thanks for the reply!!!