lucidrains / pixel-level-contrastive-learning

Implementation of Pixel-level Contrastive Learning, proposed in the paper "Propagate Yourself", in Pytorch
MIT License
252 stars 29 forks source link

positive pairs #14

Open jancylee opened 3 years ago

jancylee commented 3 years ago

As the two crops have different scales in the original image, and after the network, the two outputs have the same size. So how did you find the positive pairs, i.e., how did the correspondence come from? After the two different transformations, the two crops are not aligned.

lucidrains commented 3 years ago

i have a coordinate matrix for each image, which i also crop and interpolate, so that i can then finally determine the positive pairs through some distance threshold

jancylee commented 3 years ago

You mean the same crop and other transformations are adopted in both the image and its corresponding coordinates? So the transformed coordinates are correspond to a same coordinate system for the two crops.

lucidrains commented 3 years ago

Yes that's correct

david-az commented 3 years ago

@lucidrains thank you for the great work ! Could you please add some comments or documentation on how you're calculating these pairs ?
I have tried debugging and going step by step in your implementation, but there are still things I don't really understand.
For instance:

Thanks again !

YasserdahouML commented 2 years ago

I have the same questions, did you get over it?