README.md

December 30, 2021 ยท View on GitHub

RegionCL: Can Simple Region Swapping Contribute to Contrastive Learning?

Introduction | Results | Installation | News

Introduction

This repository contains the code, models, test results for the paper RegionCL: Can Simple Region Swapping Contribute to Contrastive Learning?. It contains a simple region swapping module to construct both global- and region-level contrastive pairs with minor modifications to current self-supervised methods, e.g., MoCov2, DenseCL, SimSiam, and so on.

Results

We test RegionCL-M/D/S on the ImageNet dataset for classification, MS COCO dataset for detection, instance segmentation and human pose estimation, Cityscapes dataset for instance and semantic segmentation, and AP-10K dataset for animal pose estimation. The results and training logs are available below.

Pretrain & Classification on ImageNet-1K

ModelPretrainIN1K Linear
RegionCL-Mlog | config69.4 | log
RegionCL-DN/A68.5 | N/A
RegionCL-SN/A71.3 | N/A

MaskRCNN detection and segmentation on MS COCO

ModelMS COCO Det&Seg C4 1xMS COCO Det&Seg FPN 1x
RegionCL-M39.8&34.8 | log40.1&36.3 | log
RegionCL-D40.3&35.2 | N/A40.4&36.7 | N/A
RegionCL-S38.7&33.7 | N/A38.8&35.2 | N/A
ModelMS COCO Det&Seg C4 2xMS COCO Det&Seg FPN 2x
RegionCL-M41.5&35.9 | log41.6&37.7 | log
RegionCL-D41.8&36.4 | N/A42.1&38.0 | N/A
RegionCL-S40.7&35.4 | N/A41.0&37.1 | N/A

RetinaNet detection on MS COCO

ModelMS COCO Det 1xMS COCO Det 2x
RegionCL-M38.4 | log40.1 | log
RegionCL-D38.8 | N/A40.6 | N/A
RegionCL-S36.8 | N/A39.1 | N/A

Instance and semantic segmentation on Cityscapes

ModelMaskRCNN Inst-SegUperNet Sem-Seg 40KUperNet Sem-Seg 80K
RegionCL-M34.9 | log78.1 | log79.0 | log
RegionCL-D34.8 | N/A78.7 | N/A79.5 | N/A
RegionCL-S34.9 | N/A77.8 | N/A78.7 | N/A

SimpleBaseline pose estimation on MS COCO and AP-10K

ModelHuman PoseAnimal Pose
RegionCL-M72.370.6
RegionCL-D73.672.1
RegionCL-S72.271.6

Installation

The code is based on Openselfsup, thanks for their wonderful work!

Requirements:

  • Python 3.6.5+
  • Pytorch (version 1.7.0)
  • mmcv (version 1.0.3)
  1. Install mmcv following the requirements as in link

  2. Clone this repository

    git clone https://github.com/Annbless/RegionCL.git

  3. Go into the repository

    cd RegionCL

  4. Install this repository

    pip install -v -e .

News

2021/12/30 Release the code and results for RegionCL-M

To do

  • Release the code and logs for RegionCL-D and RegionCL-S
  • Release the pretrained models
  • Release the RegionCL with more self-supervised methods