SupContrast icon indicating copy to clipboard operation
SupContrast copied to clipboard

Supervised Contrastive Learning with n_views=1

Open piconti opened this issue 3 years ago • 1 comments

Hello, First, thank you for this paper and code! I want to adapt you approach to use Supervised Contrastive Learning after a regional proposal network.

In this context, I was wondering, as it's not explicitly said in the paper: what are your exact motivations for including two views of the images in each batch? From my understanding/intuition, it's to ensure that the anchor is exposed to a "decent"/minimum number of positive samples, is that right?

Thank you!

piconti avatar Nov 03 '22 08:11 piconti

My understanding is that to make sure that there exist positives in the multiviewed batch, otherwise, the numerator in the loss formula (Eq. 2/3) would be 0.

zyuhan1999 avatar Apr 19 '23 11:04 zyuhan1999