michuanhaohao / AlignedReID

Alignedreid++: Dynamically Matching Local Information for Person Re-Identification.
MIT License
401 stars 114 forks source link

How to find similarity between two images? #17

Closed SmitSheth closed 5 years ago

SmitSheth commented 5 years ago

Given 2 images how to find whether they are similar or not?

michuanhaohao commented 5 years ago

@SmitSheth You can compute the global distance or local distance of features of two images.

SmitSheth commented 5 years ago

@michuanhaohao Okay. But from the image that you have displayed in the Demo section of README, the aligned distance in both images is same despite girl(black and white) in one of the image being different one. Hence, it will give wrong similarity as both the aligned distances are same. Is there something that I'm missing?

michuanhaohao commented 5 years ago

@SmitSheth Yes, it can not get the correct alignment for the negative image pair. But the distance of negative pair is reduced smaller than one of the positive pair. So it can correct the ranking indexes for some cases.

SmitSheth commented 5 years ago

@michuanhaohao Just to be clear, instead of using the aligned distance we should use original distance i.e. we should compute euclidean distance of a1 and a2 (from Alignedreid_demo.py) for finding similarity.

michuanhaohao commented 5 years ago

@SmitSheth Yes, you are right. 'Alignedreid_demo.py' is used for visualization. You can compute the distance efficiently using 'distance.py' .

BabuTango commented 5 years ago

@michuanhaohao Just to be clear, instead of using the aligned distance we should use original distance i.e. we should compute euclidean distance of a1 and a2 (from Alignedreid_demo.py) for finding similarity.

@michuanhaohao I'm using the Alignedreid_demo.py to compute the distance and find the similarity between two people. Should I use aligned distance or original distance, to say if it is the same person or different person