Skip to content

[WACV2023] This is the official PyTorch impelementation of our paper "[Rethinking Rotation in Self-Supervised Contrastive Learning: Adaptive Positive or Negative Data Augmentation](https://arxiv.org/abs/2210.12681)"

License

Notifications You must be signed in to change notification settings

AtsuMiyai/rethinking_rotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rethinking Rotation in Self-Supervised Contrastive Learning: Adaptive Positive or Negative Data Augmentation

This is the official PyTorch impelementation of our paper "Rethinking Rotation in Self-Supervised Contrastive Learning: Adaptive Positive or Negative Data Augmentation" [Miyai+, WACV2023].

We propose a novel augmentation strategy for self-supervised contrastive learning, adaptive Positive or Negative Data Augmentation (PNDA), in which an original and its rotated image are a positive pair if they are semantically close and a negative pair if they are semantically different. To achieve PNDA, we first determine whether rotation is positive or negative on an image-by-image basis in an unsupervised way (RAI sampling). Then, we apply PNDA to contrastive learning frameworks. Our experiments showed that PNDA improves the performance of contrastive learning.

Preparation

Please make data folder. Please download following datasets to data.

Usage

Our method comprises two major steps:

  1. Run sampling of RAI whose rotation is treated as positive.
  2. Run PNDA for contrastive learning (MoCo v2, SimCLR).

The codes and their details for each step are stored in a sub-directory with the corresponding name RAI_SAMPLING, PNDA_SIMCLR, PNDA_MOCO.

The RAI sampling results used in the experiment are stored in RAI_results. Therefore, you can start from either step.

Citation

@inproceedings{miyai2023pnda,  
  title={Rethinking Rotation in Self-Supervised Contrastive Learning: Adaptive Positive or Negative Data Augmentation},  
  author={Miyai, Atsuyuki and Yu, Qing and Ikami, Daiki and Irie, Go and Aizawa Kiyoharu},  
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},  
  year={2023}  
}

About

[WACV2023] This is the official PyTorch impelementation of our paper "[Rethinking Rotation in Self-Supervised Contrastive Learning: Adaptive Positive or Negative Data Augmentation](https://arxiv.org/abs/2210.12681)"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published