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 124 forks source link

how to get m matrix from original raw/yaw/pitch? #35

Closed xingmimfl closed 4 years ago

xingmimfl commented 4 years ago

anyone knows??

huyanfei-cqupt commented 4 years ago

hi, which one file is the Encoder(E) and the Decoder(D)? Thank you

xingmimfl commented 4 years ago

hi, which one file is the Encoder(E) and the Decoder(D)? Thank you

In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN

huyanfei-cqupt commented 4 years ago

However, the author say their code works, only some areas need optimization,and if there is no E and D, how can his frame effect be obtained? So I am also confused. Do you have a better opinion on this project? Is it convenient to communicate?

xingmimfl commented 4 years ago

anyone knows??

       # transform mesh
        s = pose_para[-1, 0]
        angles = pose_para[:3, 0]
        t = pose_para[3:6, 0]
        angles = np.asarray([angles[0], angles[1], angles[2]])
        matrix = mesh.transform.angle2matrix_3ddfa(angles)
        ortho_matrix = np.asarray([
            [1,0,0],
            [0,1,0]])
        t_matrix = np.asarray([[t[0]],[t[1]]])
        m = ortho_matrix.dot(matrix)
        m = s * m #----scale
        print("m.shape:\t", m.shape)
        #-----version 3------
        m = np.concatenate([m,t_matrix], axis=1).T
        vertices = vertices
        m = m.reshape(-1, 8)
huyanfei-cqupt commented 4 years ago

anyone knows??

       # transform mesh
        s = pose_para[-1, 0]
        angles = pose_para[:3, 0]
        t = pose_para[3:6, 0]
        angles = np.asarray([angles[0], angles[1], angles[2]])
        matrix = mesh.transform.angle2matrix_3ddfa(angles)
        ortho_matrix = np.asarray([
            [1,0,0],
            [0,1,0]])
        t_matrix = np.asarray([[t[0]],[t[1]]])
        m = ortho_matrix.dot(matrix)
        m = s * m #----scale
        print("m.shape:\t", m.shape)
        #-----version 3------
        m = np.concatenate([m,t_matrix], axis=1).T
        vertices = vertices
        m = m.reshape(-1, 8)

hi, which one file is the Encoder(E) and the Decoder(D)? Thank you

In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN

hi, I try to use the follow command to run this source code,but reporting errors.

hi, which one file is the Encoder(E) and the Decoder(D)? Thank you

In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN

hi, I try to use the follow command to run this source code,but reporting error. the error as follow: "NotFoundError: TF_newop/cuda_op_kenel_v2-sz224.so:cannot open shared object file:No such file or directory" the command as follow ""python main_non_linear_3DMM.py --batch_size 128 --sample_size 128 --is_train True --learning_rate 0.001 --ouput_size 224 --gf_dim 32 --df_dim 32 --dfc_dim 320 --gfc_dim 320 --z_dim 20 --c_dim 3 --is_using_landmark True --shape_loss l2 --tex_loss l1 --is_using_recon False --is_using_frecon False --is_partbase_albedo False --is_using_symetry True --is_albedo_supervision False --is_batchwise_white_shading True --is_const_albedo True --is_const_local_albedo True --is_smoothness True --gpu 0,"" Have you encountered this situation before? If so, how did you solve it?

huyanfei-cqupt commented 4 years ago

I did not find the "cuda_op_kenel_v2-sz224.so" under the "TF_newop" folder. so I want to ask where can I find the file? I use the follow command: ./compile_op_v2_sz224.sh, but it reporting error.

------------------ 原始邮件 ------------------ 发件人: "xingmimfl"<notifications@github.com>; 发送时间: 2020年6月3日(星期三) 上午10:26 收件人: "tranluan/Nonlinear_Face_3DMM"<Nonlinear_Face_3DMM@noreply.github.com>; 抄送: "梦之泪"<995657906@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [tranluan/Nonlinear_Face_3DMM] how to get m matrix from original raw/yaw/pitch? (#35)

anyone knows??

transform mesh s = pose_para[-1, 0] angles = pose_para[:3, 0] t = pose_para[3:6, 0] angles = np.asarray([angles[0], angles[1], angles[2]]) matrix = mesh.transform.angle2matrix_3ddfa(angles) ortho_matrix = np.asarray([ [1,0,0], [0,1,0]]) t_matrix = np.asarray([[t[0]],[t[1]]]) m = ortho_matrix.dot(matrix) m = s * m #----scale print("m.shape:\t", m.shape) #-----version 3------ m = np.concatenate([m,t_matrix], axis=1).T vertices = vertices m = m.reshape(-1, 8)

hi, which one file is the Encoder(E) and the Decoder(D)? Thank you

In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN

hi, I try to use the follow command to run this source code,but reporting errors.

[ ]

[ ]

hi, which one file is the Encoder(E) and the Decoder(D)? Thank you

In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN

hi, I try to use the follow command to run this source code,but reporting error. the error as follow: "NotFoundError: TF_newop/cuda_op_kenel_v2-sz224.so:cannot open shared object file:No such file or directory" the command as follow ""python main_non_linear_3DMM.py --batch_size 128 --sample_size 128 --is_train True --learning_rate 0.001 --ouput_size 224 --gf_dim 32 --df_dim 32 --dfc_dim 320 --gfc_dim 320 --z_dim 20 --c_dim 3 --is_using_landmark True --shape_loss l2 --tex_loss l1 --is_using_recon False --is_using_frecon False --is_partbase_albedo False --is_using_symetry True --is_albedo_supervision False --is_batchwise_white_shading True --is_const_albedo True --is_const_local_albedo True --is_smoothness True --gpu 0,"" Have you encountered this situation before? If so, how did you solve it? you need compile cuda_op_kenel_v2-sz224.so firstly. and this repo seems a little difficult to reimplement

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

huyanfei-cqupt commented 4 years ago

For the encoder module, how does it estimate the parameters? How do you understand? thanks for your answer.

------------------ 原始邮件 ------------------ 发件人: "xingmimfl"<notifications@github.com>; 发送时间: 2020年6月3日(星期三) 上午10:26 收件人: "tranluan/Nonlinear_Face_3DMM"<Nonlinear_Face_3DMM@noreply.github.com>; 抄送: "梦之泪"<995657906@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [tranluan/Nonlinear_Face_3DMM] how to get m matrix from original raw/yaw/pitch? (#35)

anyone knows??

transform mesh s = pose_para[-1, 0] angles = pose_para[:3, 0] t = pose_para[3:6, 0] angles = np.asarray([angles[0], angles[1], angles[2]]) matrix = mesh.transform.angle2matrix_3ddfa(angles) ortho_matrix = np.asarray([ [1,0,0], [0,1,0]]) t_matrix = np.asarray([[t[0]],[t[1]]]) m = ortho_matrix.dot(matrix) m = s * m #----scale print("m.shape:\t", m.shape) #-----version 3------ m = np.concatenate([m,t_matrix], axis=1).T vertices = vertices m = m.reshape(-1, 8)

hi, which one file is the Encoder(E) and the Decoder(D)? Thank you

In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN

hi, I try to use the follow command to run this source code,but reporting errors.

[ ]

[ ]

hi, which one file is the Encoder(E) and the Decoder(D)? Thank you

In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN

hi, I try to use the follow command to run this source code,but reporting error. the error as follow: "NotFoundError: TF_newop/cuda_op_kenel_v2-sz224.so:cannot open shared object file:No such file or directory" the command as follow ""python main_non_linear_3DMM.py --batch_size 128 --sample_size 128 --is_train True --learning_rate 0.001 --ouput_size 224 --gf_dim 32 --df_dim 32 --dfc_dim 320 --gfc_dim 320 --z_dim 20 --c_dim 3 --is_using_landmark True --shape_loss l2 --tex_loss l1 --is_using_recon False --is_using_frecon False --is_partbase_albedo False --is_using_symetry True --is_albedo_supervision False --is_batchwise_white_shading True --is_const_albedo True --is_const_local_albedo True --is_smoothness True --gpu 0,"" Have you encountered this situation before? If so, how did you solve it? you need compile cuda_op_kenel_v2-sz224.so firstly. and this repo seems a little difficult to reimplement

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

xingmimfl commented 4 years ago

For the encoder module, how does it estimate the parameters? How do you understand? thanks for your answer. ------------------ 原始邮件 ------------------ 发件人: "xingmimfl"<notifications@github.com>; 发送时间: 2020年6月3日(星期三) 上午10:26 收件人: "tranluan/Nonlinear_Face_3DMM"<Nonlinear_Face_3DMM@noreply.github.com>; 抄送: "梦之泪"<995657906@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [tranluan/Nonlinear_Face_3DMM] how to get m matrix from original raw/yaw/pitch? (#35) anyone knows?? # transform mesh s = pose_para[-1, 0] angles = pose_para[:3, 0] t = pose_para[3:6, 0] angles = np.asarray([angles[0], angles[1], angles[2]]) matrix = mesh.transform.angle2matrix_3ddfa(angles) ortho_matrix = np.asarray([ [1,0,0], [0,1,0]]) t_matrix = np.asarray([[t[0]],[t[1]]]) m = ortho_matrix.dot(matrix) m = s * m #----scale print("m.shape:\t", m.shape) #-----version 3------ m = np.concatenate([m,t_matrix], axis=1).T vertices = vertices m = m.reshape(-1, 8) hi, which one file is the Encoder(E) and the Decoder(D)? Thank you In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN hi, I try to use the follow command to run this source code,but reporting errors. [ ] [ ] hi, which one file is the Encoder(E) and the Decoder(D)? Thank you In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN hi, I try to use the follow command to run this source code,but reporting error. the error as follow: "NotFoundError: TF_newop/cuda_op_kenel_v2-sz224.so:cannot open shared object file:No such file or directory" the command as follow ""python main_non_linear_3DMM.py --batch_size 128 --sample_size 128 --is_train True --learning_rate 0.001 --ouput_size 224 --gf_dim 32 --df_dim 32 --dfc_dim 320 --gfc_dim 320 --z_dim 20 --c_dim 3 --is_using_landmark True --shape_loss l2 --tex_loss l1 --is_using_recon False --is_using_frecon False --is_partbase_albedo False --is_using_symetry True --is_albedo_supervision False --is_batchwise_white_shading True --is_const_albedo True --is_const_local_albedo True --is_smoothness True --gpu 0,"" Have you encountered this situation before? If so, how did you solve it? you need compile cuda_op_kenel_v2-sz224.so firstly. and this repo seems a little difficult to reimplement — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

this repo is very hard to reimplement, and i quit it

cyjouc commented 3 years ago

For the encoder module, how does it estimate the parameters? How do you understand? thanks for your answer. ------------------ 原始邮件 ------------------ 发件人: "xingmimfl"[notifications@github.com](mailto:notifications@github.com); 发送时间: 2020年6月3日(星期三) 上午10:26 收件人: "tranluan/Nonlinear_Face_3DMM"[Nonlinear_Face_3DMM@noreply.github.com](mailto:Nonlinear_Face_3DMM@noreply.github.com); 抄送: "梦之泪"[995657906@qq.com](mailto:995657906@qq.com);"Comment"[comment@noreply.github.com](mailto:comment@noreply.github.com); 主题: Re: [tranluan/Nonlinear_Face_3DMM] how to get m matrix from original raw/yaw/pitch? (#35) anyone knows?? # transform mesh s = pose_para[-1, 0] angles = pose_para[:3, 0] t = pose_para[3:6, 0] angles = np.asarray([angles[0], angles[1], angles[2]]) matrix = mesh.transform.angle2matrix_3ddfa(angles) ortho_matrix = np.asarray([ [1,0,0], [0,1,0]]) t_matrix = np.asarray([[t[0]],[t[1]]]) m = ortho_matrix.dot(matrix) m = s * m #----scale print("m.shape:\t", m.shape) #-----version 3------ m = np.concatenate([m,t_matrix], axis=1).T vertices = vertices m = m.reshape(-1, 8) hi, which one file is the Encoder(E) and the Decoder(D)? Thank you In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN hi, I try to use the follow command to run this source code,but reporting errors. [ ] [ ] hi, which one file is the Encoder(E) and the Decoder(D)? Thank you In my opinion, it has no Decoder or Encoder in original paper, and it has nothing to do with GAN hi, I try to use the follow command to run this source code,but reporting error. the error as follow: "NotFoundError: TF_newop/cuda_op_kenel_v2-sz224.so:cannot open shared object file:No such file or directory" the command as follow ""python main_non_linear_3DMM.py --batch_size 128 --sample_size 128 --is_train True --learning_rate 0.001 --ouput_size 224 --gf_dim 32 --df_dim 32 --dfc_dim 320 --gfc_dim 320 --z_dim 20 --c_dim 3 --is_using_landmark True --shape_loss l2 --tex_loss l1 --is_using_recon False --is_using_frecon False --is_partbase_albedo False --is_using_symetry True --is_albedo_supervision False --is_batchwise_white_shading True --is_const_albedo True --is_const_local_albedo True --is_smoothness True --gpu 0,"" Have you encountered this situation before? If so, how did you solve it? you need compile cuda_op_kenel_v2-sz224.so firstly. and this repo seems a little difficult to reimplement — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

this repo is very hard to reimplement, and i quit it

I compile cuda_op_kenel_v2-sz224.so firstly."host_defines.h is an internal header file and must not be used directly. The error happen" This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]"? Do you occur to the error?