I am trying to reimplement the excellent paper https://github.com/1adrianb/face-alignment-training in tensorflow. I have successfully defined the network and downloaded the LSD3D-W dataset. I am able to train the model however I am running into a serious issue.
Ground Truth and Loss
For training, I generate ground truths by converting the x,y landmark coordinates into gaussian heatmaps where x,y is the mean of the gaussian.
I first trained with MSE loss as given in the original implementation. After some iterations, the loss becomes extremely small but the output is completely white!
loss = tf.losses.mean_squared_error(
predictions=heatmaps, labels=labels_tensor
)
When I tried with cross entropy, I am getting better results. But they are not sharper
loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=heatmaps, labels=labels_tensor), name= 'cross_entropy_loss')
gtmap means groundtruth map.