From 032141656b1225ab5fab6443473e25ee8e843aeb Mon Sep 17 00:00:00 2001 From: "Kyle M. Tarplee" Date: Tue, 29 May 2018 21:04:15 -0400 Subject: [PATCH] updated the readme --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e8d04bd6..822b9ffe 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Siamese and triplet networks are useful to learn mappings from image to a compac # Installation -Requires [pytorch](http://pytorch.org/) 0.3.1 with torchvision 0.2.0 +Requires [pytorch](http://pytorch.org/) 0.4 with torchvision 0.2.1 # Code structure @@ -103,7 +103,7 @@ There are couple of problems with siamese and triplet networks: 2. We generate pairs/triplets *randomly*. As the training continues, more and more pairs/triplets are **easy** to deal with (their loss value is very small or even 0), *preventing the network from training*. We need to provide the network with **hard examples**. 3. Each image that is fed to the network is used only for computation of contrastive/triplet loss for only one pair/triplet. The computation is somewhat wasted; once the embedding is computed, it could be reused for many pairs/triplets. -To deal with these issues efficiently, we'll feed a network with standard mini-batches as we did for classification. The loss function will be responsible for selection of hard pairs and triplets within mini-batch. If we feed the network with 16 images per 10 classes, we can process up to 159\*160/2 = 12720 pairs and 10\*16\*15/2\*(9\*16) = 172800 triplets, compared to 80 pairs and 53 triplets in previous implementation. +To deal with these issues efficiently, we'll feed a network with standard mini-batches as we did for classification. The loss function will be responsible for selection of hard pairs and triplets within mini-batch. If we feed the network with 16 images per 10 classes, we can process up to 159\*160/2 = 12720 pairs and 10\*16\*15/2\*(9\*16) = 172800 triplets, compared to 80 pairs and 53 triplets in previous implementation. Usually it's not the best idea to process all possible pairs or triplets within a mini-batch. We can find some strategies on how to select triplets in [2] and [3]. @@ -191,4 +191,3 @@ Online triplet loss with negative mining [4] Brandon Amos, Bartosz Ludwiczuk, Mahadev Satyanarayanan, [OpenFace: A general-purpose face recognition library with mobile applications](http://reports-archive.adm.cs.cmu.edu/anon/2016/CMU-CS-16-118.pdf), 2016 [5] Yi Sun, Xiaogang Wang, Xiaoou Tang, [Deep Learning Face Representation by Joint Identification-Verification](http://papers.nips.cc/paper/5416-deep-learning-face-representation-by-joint-identification-verification), NIPS 2014 -