lightly-ai / lightly

A python library for self-supervised learning on images.
https://docs.lightly.ai/self-supervised-learning/
MIT License
2.92k stars 250 forks source link

Multi-crop in SimCLRTransform #1639

Closed opencomvis closed 2 weeks ago

opencomvis commented 2 weeks ago

Some models in lightly used SimCLRTransform (e.g, DCL, NNCLR); however, these models also employ the idea of multi-crop (that's originally used for SwaV model) to improve their results, as mentioned in their papers. Is there a way to use multi-crop in SimCLRTransform? Thank you for your help.

philippmwirth commented 2 weeks ago

Hi @opencomvis, thanks for the question! At the moment we don't offer out-of-the-box multi-crop versions of the SimCLR or DCL loss function but it should be possible to build them based on our pairwise contrastive loss implementations.

For the augmentations you can combine MultiCropTransform with custom transforms or simply use SwAV transform.

opencomvis commented 2 weeks ago

Got it, thank you for the response.