kpzhang93 / MTCNN_face_detection_alignment

Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks
MIT License
2.8k stars 1.01k forks source link

Loss value for invalid samples when training #37

Open jetta opened 6 years ago

jetta commented 6 years ago

Hi, for this multi-task network, if there is no valid samples for some task in one batch, such as no -2 label for landmark features or no -1 and 1 labels for bbox features. when this happens, what the corresponding loss value should be? nan or 0? Thanks in advance!

ilyanelken commented 5 years ago

@jetta Hi, loss function should be calculated according to samples you do have. If you look in the original paper target loss function, this is controlled by beta coefficient (sample type indicator). Ilya