image-similarity-deep-ranking
image-similarity-deep-ranking copied to clipboard
How to construct triplets.txt file correctly?
Hello! Thank you for sharing such a useful method of comparing image similarity.
I encountered a problem when I tried to implement the code tripletSampler.py. I executed the program by input [python tripletSampler.py --input_directory ~/Desktop/image-similarity-deep-ranking-master/dataset --output_directory ~/Desktop/image-similarity-deep-ranking-master --num_pos_images 1 --num_neg_images 1].
And here is my dataset.
Folder [dataset] --------Folder[SimilarityClass1] ---------------Image[GT.png] --------Folder[SimilarityClass2] ---------------Image[neg.png]
After I run the code. The triplets.txt was created but it was totally empty.
It let me get an error when I executed deepRanking.py. It showed "Found 0 images belonging to 0 classes. ZeroDivisionError: integer division or modulo by zero"
Can you tell me which step did I mess up?
Thank you very much for your help!
did u solve it?I have the same question
In the code, the author set hard code for the triplet folder. You could change in deepRanking.py file