yfeng95 / PRNet

Joint 3D Face Reconstruction and Dense Alignment with Position Map Regression Network (ECCV 2018)
http://openaccess.thecvf.com/content_ECCV_2018/papers/Yao_Feng_Joint_3D_Face_ECCV_2018_paper.pdf
MIT License
4.95k stars 947 forks source link

About Training #118

Open jhj7905 opened 5 years ago

jhj7905 commented 5 years ago

@YadiraF @developer-mayuan @nilday

Hello I have a question about train When i trained the network, the outputs of prediction are same as input(position map) like below temp i thought the problem was related to loss function(i mean 'weight') Parts of my code like below `uv_weight_mask = cv2.imread('/home/hyunjo/3D_Mesh/prnet_train/PRNet/Data/uv-data/uv_face_mask.png') uv_weight_mask = cv2.cvtColor(uv_weight_mask, cv2.COLOR_BGR2RGB) uv_array = np.array(uv_weight_mask, dtype=np.float32) uv_array = uv_array/255.0

x = tf.placeholder(tf.float32, shape=[None, 256, 256, 3]) label = tf.placeholder(tf.float32, shape=[None, 256, 256, 3]) weight = tf.placeholder(tf.float32, shape=[None, 256, 256, 3])

net = resfcn256(256, 256) x_op = net(x, is_training=True) loss = tf.losses.mean_squared_error(label, x_op, weights=weight)` Could you tell me advice? Thank you in advance

yexiaoxi01 commented 5 years ago

@jhj7905 Hello,I am very similar to your training, with the same weight. There are also some problems with the results. Did you solved this problem? My image and model do not matched.like this: image image

qiannvMao commented 5 years ago

@jhj7905 @yexiaoxi01 Hi,as a newer to this, I failed to achieve the training code, could you please provide training code to me? I hope I can get your help, thank you very much. My email: mqn20170910@163.com

yexiaoxi01 commented 5 years ago

@qiannvMao i just try the traing code provide by https://github.com/YadiraF/PRNet/issues/46#issuecomment-455841527

qiannvMao commented 5 years ago

@yexiaoxi01 thank you, I will try.