Giter Site home page Giter Site logo

wangguanzhi / ladn Goto Github PK

View Code? Open in Web Editor NEW
183.0 183.0 26.0 2.57 MB

This is the implementation for Local Adversarial Disentangling Network for Facial Makeup and De-Makeup

Home Page: https://georgegu1997.github.io/LADN-project-page/

Shell 0.08% Python 99.92%

ladn's People

Contributors

georgegu1997 avatar wangguanzhi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ladn's Issues

How did you train the svm model for classification of facial attributes?

Hello, and good evening. Very concrete work on the paper as well as the approach. 👍

I note the following from the paper

The best feature vector to each attribute is obtained form the designated region via a combination of three shape and color features which are: RGB-Histograms, HOG [19] and LBP [20]. The combination is selected empirically to extract the best feature vector for each attribute. Multi-class SVM classification model using LIBSVM [21] is adopted here for training and classification after dimensionality reduction of the extracted feature vectors using PCA [22].

So, face++ framework is used to identify the regions of interest.

  1. But how do move from regions of interest to the classes of the facial attributes?
  2. Did you also create an intermediate dataset to tag the images with the facial attributes?
  3. What did the training of SVM take as input?

A problem about:"RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation"

Excuse , I have a question, when I run it, I faced a problem like this:
"RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [128]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

Locate the problem in the step of loss_z_L1.backward() in model.py. I searched that some said it was an error in the process of backpropagation, and some said it was a pytorch version problem, but currently pytorch1.1.0 cannot be installed with conda.

The versions I use are pytorch1.5.1, torchvision0.6.1, cuda10.1

picture
Do you know how to solve it? Thank you so much!

test时程序一直卡住

在使用light.pth测试时,程序卡在ep0, total_it = model.resume(opts.resume)中,具体是卡在getattr(self, 'dis'+local_part.capitalize()).load_state_dict(checkpoint_backup['dis'+local_part.capitalize()])处。想问下这是正常的吗,该如何解决

How to get blending images

Hello, I wanna test on my own dataset. I have makeup and non-makeup images, but I dont have the blending images, could you please tell me how to generate them. Thanks in advance

landmark_file

I want to test some new data that wasn't in your datasets,
but I got an error message that the landmarks of new images are not in the 'landmark_file'.

I would like to ask you how do I generate 'landmark_file' for new data.

Thank you and looking forward to your reply.

Training Problem

Thank you for your great work.
But I had some problems when I training a new model.
Traceback (most recent call last): File "run.py", line 152, in <module> main() File "run.py", line 126, in main model.update_EG() File "/data1/LADN-master/src/model.py", line 697, in update_EG self.backward_G_alone() File "/data1/LADN-master/src/model.py", line 677, in backward_G_alone loss_z_L1.backward() File "/usr/local/miniconda3/lib/python3.6/site-packages/torch/tensor.py", line 198, in back ward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/usr/local/miniconda3/lib/python3.6/site-packages/torch/autograd/__init__.py", line 1 00, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: one of the variables needed for gradient computation has been modified by an in place operation: [torch.cuda.FloatTensor [128]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, wit h torch.autograd.set_detect_anomaly(True).
Didn't you have this problem when you were training your models? I set inplace=False innn.ReLU and nn.LeakyReLU, but it still didn't work.

How to create synthetic ground truth images

The traning dataset includes synthetic ground truth. However when I would like to add the new images to the dataset, I cannot prepare synthetic ground truth for new images. So would you tell me how to create synthetic ground truth?

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [128]] is at version 2; expected version 1 instead.

Hello, I encountered the following problem while reproducing the code. Can you help me solve it.

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [128]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

Pytorch version and the learning rate problem?

Hi, I have two questions with this repo.

  1. which version of pytorch you used for training the LADN?
  2. The learning rate for generator and discriminators is set to 0.0001, but the G_loss curve goes down and then goes up. Is this normal?

Test problem

Hi,guanzhi,there is a problem occured.
`--- load model ---
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
start the training at epoch 2800

--- train ---
starting forward for testing images
Traceback (most recent call last):
File "run.py", line 152, in
main()
File "run.py", line 85, in main
model.test_forward(images_a, images_b, images_c)
File "/opt_ext_one/Documents/sfj/LADN/src/model.py", line 763, in test_forward
self.z_content_a, self.z_content_b = self.enc_c.forward(self.real_A_encoded, self.real_B_encoded)
File "/opt_ext_one/Documents/sfj/LADN/src/networks.py", line 140, in forward
outputA = self.forward_a(xa)
File "/opt_ext_one/Documents/sfj/LADN/src/networks.py", line 148, in forward_a
e1_2_A = self.bn_e1_A(self.conv2_e1_A(self.relu_e1_A(e1_1_A)))
File "/home/peter/miniconda3/envs/TF_and_Pytorch_GPU/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/peter/miniconda3/envs/TF_and_Pytorch_GPU/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py", line 81, in forward
exponential_average_factor, self.eps)
File "/home/peter/miniconda3/envs/TF_and_Pytorch_GPU/lib/python3.6/site-packages/torch/nn/functional.py", line 1670, in batch_norm
training, momentum, eps, torch.backends.cudnn.enabled
RuntimeError: cuDNN error: CUDNN_STATUS_BAD_PARAM`
Thanks for your time!

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [128]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

When i try to train this model ,it get error like this:

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [128]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

does somobody getting this same error?can you figure it out?

thanks a lot~

测试效果

你好!非常感谢分享您的**并且公开code!
我运行了您的测试程序,但是感觉妆容很脏,我是安装您的git指导运行的,请问有什么需要注意的吗?
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.