ethz-asl / hierarchical_loc

Deep image retrieval for efficient 6-DoF localization
BSD 3-Clause "New" or "Revised" License
178 stars 38 forks source link

How to calculate triplet loss with teacher_model and student_model #9

Closed YellowBe closed 3 years ago

YellowBe commented 3 years ago

Hello, what is the formula to calculate the loss in mobilenetvlad with distillation? I saw in loss function there is descriptor_n and descriptor_p, where are they come from? I am sorry about i don’t understand well in where the loss get their descriptors.

sarlinpe commented 3 years ago

The loss is simply the L2 loss between the student descriptors and the teacher descriptors. The former are predicted by MobileNetVLAD while the latter are precomputed from NetVLAD. There is no triplet loss. Please refer to the paper and to the code for more details.