tranluan / Nonlinear_Face_3DMM

Source code for "Nonlinear 3D Face Morphable Model"
http://cvlab.cse.msu.edu/project-nonlinear-3dmm.html
Apache License 2.0
676 stars 123 forks source link

How can I test out the model on some images? #25

Open ghost opened 5 years ago

ghost commented 5 years ago

Hi,

@tranluan I want to test out the model on some images and see the results (3D mesh, rendered image....)

How can I try ?

tranluan commented 5 years ago

If you need images for comparison for a submission, (or just want to try out with a few images), please send those images to me (tranluan@msu.edu). We can't release the pretrained model at the moment.

welbeckzhou commented 5 years ago

If you need images for comparison for a submission, (or just want to try out with a few images), please send those images to me (tranluan@msu.edu). We can't release the pretrained model at the moment.

I have trained the model by myself, could please share the test code?

Light-SH commented 4 years ago

@welbeckzhou Hello, do you know how to test code now?

zhuort commented 4 years ago

@welbeckzhou Hello, I wonder how to train with the loss L, which contains the adversarial loss?

pminhtam commented 4 years ago
    def test(self, config,input_images_fn_300W,input_masks_fn_300W):

        tx = np.random.random_integers(0, 32, size=config.batch_size)
        ty = np.random.random_integers(0, 32, size=config.batch_size)
        tf.global_variables_initializer().run()

        ffeed_dict = {self.input_images_fn_300W[0] : input_images_fn_300W,self.input_offset_height: tx, self.input_offset_width: ty,\
                     self.input_masks_fn_300W[0]:input_masks_fn_300W}
        img , texture,albedo,shade = self.sess.run([self.G_images_300W,self.texture_300W,self.albedo_300W, self.shade_300W], feed_dict=ffeed_dict)
        print(img , texture )
        return img , texture,albedo,shade

This is code i use to test model