pbaylies / stylegan-encoder

StyleGAN Encoder - converts real images to latent space
Other
740 stars 182 forks source link

train new feature classifier on face dataset problem #15

Closed shartoo closed 5 years ago

shartoo commented 5 years ago

I'm trying to train a face feature classifier and then get a feature axis like TL-GAN ,but it seems that the dlib face detector did not work very well,it may fail on some facial image. I checked some face detection model and thought MCTNN may be a better replacement for dlib in perceptual_model.py ,as MTCNN is of higher accuracy and faster.

shartoo commented 5 years ago

And for fined face mask,there is a kind of algorithm names image matting, repo like global matting may helps but it need tri-map mask(a rough mask which can be generated by your morphology cv algorithm). Thank you for your sharing!

pbaylies commented 5 years ago

@shartoo the main reason to use dlib here is just because NVIDIA used it in training their pre-trained models in the first place, and provided their implementation of aligning images, so we can align them in a consistent fashion. But really any detector that provides the same basic landmarks should be fine, and would allow you to more or less replicate their results.

Also, it doesn't matter so much if you're training your own models, in that case you can process your data in a consistent fashion so that the encoded images are treated in the same way. I'm glad you found the masking helpful, grabcut was designed for it, really. If you'd like to provide another compatible method for aligning images and/or generating masks, well, patches are welcome!