AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.65k stars 7.96k forks source link

How to implement triplet loss in DARKNET such as FACENET for face comparison? #2379

Open oldwolf204 opened 5 years ago

oldwolf204 commented 5 years ago

I want to implement triplet loss of FACENET in DARKNET for face comparison. How can I do that?

d3rezz commented 5 years ago

Take a look at this tensorflow code and blog post: https://github.com/omoindrot/tensorflow-triplet-loss The blog post linked there is very clear and useful. After you understand how the triplets are selected from each batch and the loss is computed it should be easier to write the equivalent code using darknet. good luck ;)