Facial-Similarity-with-Siamese-Networks-in-Pytorch
Facial-Similarity-with-Siamese-Networks-in-Pytorch copied to clipboard
Dataset Random.choice can mislabel
Thanks for putting this up for others to look at.
I noticed in the dataset code that if the random.randint(0,1) ends up being 0, the code that runs is img1_tuple = random.choice(self.imageFolderDataset.imgs). This can (though low probability) choose a img from the same folder. This would mis-label the img pairs as not being the same, but indeed they are.
Didn't you see the code below?
if img0_tuple[1] !=img1_tuple[1]: break