Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genearting unmasked faces from faces #25

Open
chandniagarwal opened this issue Jul 16, 2022 · 23 comments
Open

Genearting unmasked faces from faces #25

chandniagarwal opened this issue Jul 16, 2022 · 23 comments

Comments

@chandniagarwal
Copy link

Hi! I am using the model for generating new faces from masked faces. I have run test.py and modify the code a little for removing face mask.

The model is not performing on CelebA masked faces , kindly guide for training for masked face, do i need to pass masks ?

@USTC-JialunPeng
Copy link
Owner

Hi! I didn't fully understand your question. Could you please be more specific?

@chandniagarwal
Copy link
Author

Thanks Peng!!

I am research scholar and using your model in regenerating faces on my own dataset with masked faces (created on celebA and celebAHQ). I have used your pre-trained model given on git for the face reconstruction using test.py.
The created faces are not at all good for celebA whereas faces created for CelebAHQ are somewhat better as your model is trained on that.
My Issues are :

  1. rightnow tensorflow error is coming. used tensorflow-gpu/tensorflow on colab pro , previously code was working on colab pro version.
    image
  2. I want to train the model with my dataset , so what images to input : Ground Truth and Masked Face .?
  3. Do I need to train with binary map of masks like you have used random masks? Please guide.

All the issues are urgent as my paper submission is due and my lot of time is going in troubleshoot. I am planning to make it base paper and to be used as transfer learning model.

TIA

@chandniagarwal
Copy link
Author

done with tensorflow error now in another notebook. please guide about training .

@USTC-JialunPeng
Copy link
Owner

Sorry, I just saw your issues.

If you want to train a new model, you need to input the masked image and the corresponding binary mask in the training. In our training code, the masked image and the corresponding binary mask are automatically generated. So you just need to collect the ground truth dataset and leave the masking procedure to the code. You can set the random_mask argument to True to use random masks, otherwise the default center masks will be used.

Best wishes,
Jialun

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 19, 2022 via email

@USTC-JialunPeng
Copy link
Owner

Right. You just need to collect your ground truth dataset and make a path list. Please refer to our training instructions for more details.

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 21, 2022 via email

@USTC-JialunPeng
Copy link
Owner

Are you training the model on GPU? BTW, which TensorFlow version are you using?

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 23, 2022 via email

@USTC-JialunPeng
Copy link
Owner

Of course you can use your own masks instead of generated masks. But it may be challenging for you to modify the corresponding code. You can take a try and I wish you good luck.

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 24, 2022 via email

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 24, 2022 via email

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 24, 2022 via email

@USTC-JialunPeng
Copy link
Owner

It seems that the negative log-likelihood (NLL) diverges at the beginning of training. Could you provide more details about your code modifications?

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 28, 2022 via email

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 29, 2022 via email

@USTC-JialunPeng
Copy link
Owner

I'm afraid it's not convenient for me to attend google meeting. I also don't know why the NLL diverges. Can you briefly describe what changes were made?

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 30, 2022 via email

@USTC-JialunPeng
Copy link
Owner

USTC-JialunPeng commented Jul 30, 2022

I think it may be the reason. I have only evaluated our method on 256x256 image size.

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 30, 2022 via email

@chandniagarwal
Copy link
Author

chandniagarwal commented Jul 31, 2022 via email

@chandniagarwal
Copy link
Author

chandniagarwal commented Oct 11, 2022 via email

@USTC-JialunPeng
Copy link
Owner

We didn't put masks and images in the same folder. One random mask and one random image are loaded to generate a masked image in the training. The generated masked image and the corresponding mask are send into the model while the image is used as ground truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants