Facial-Similarity-with-Siamese-Networks-in-Pytorch icon indicating copy to clipboard operation
Facial-Similarity-with-Siamese-Networks-in-Pytorch copied to clipboard

Dataset Random.choice can mislabel

Open lr1100 opened this issue 4 years ago • 1 comments

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.

lr1100 avatar Nov 24 '20 16:11 lr1100

Didn't you see the code below? if img0_tuple[1] !=img1_tuple[1]: break

fire717 avatar Dec 23 '20 09:12 fire717