← Open Source
SwinTransformer

Transformer-SSL

This is an official implementation for "Self-Supervised Learning with Swin Transformers".

Model DevelopmentArchitecturePython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
674
Stars
72
Forks
+0
This week
7
Contributors
Created 2021-05-05 · Updated 2026-09-27 · #15167 today
Top developers
ancientmoonerzdaxiemicrosoftopensource

SwinTransformer/Transformer-SSL is ranked 15,167 with 674 stars.

Same-category comparison

SwinTransformer/Transformer-SSL is ranked 15,167 among these 8 peers; bahjat-kawar/ddrm is ranked 15,169.

Same-category comparison
NameRankMetrics
duxuhao/Feature-Selection15,150
Language:
Python
Stars:
675
Forks:
196
Description:
Features selector based on the self selected-algorithm, loss function and validation method.
fatiando/verde15,151
Language:
Python
Stars:
675
Forks:
76
Description:
Processing and gridding spatial data, machine-learning style.
lucasjinreal/DCNv2_latest15,156
Language:
C++
Stars:
675
Forks:
131
Description:
DCNv2 supports decent pytorch such as torch 1.5+ (now 1.8+).
revenol/DROO15,159
Language:
Python
Stars:
675
Forks:
194
Description:
Deep Reinforcement Learning for Online Computation Offloading in Wireless Powered Mobile-Edge Computing Networks.
bahjat-kawar/ddrm15,169
Language:
Python
Stars:
674
Forks:
69
bigartm/bigartm15,170
Language:
C++
Stars:
674
Forks:
117
Description:
Fast topic modeling platform.
facebookresearch/synsin15,172
Language:
Python
Stars:
674
Forks:
93
Description:
View synthesis for the public.
muhanzhang/SEAL15,175
Language:
C
Stars:
674
Forks:
145
Description:
SEAL (learning from Subgraphs, Embeddings, and Attributes for Link prediction). "M. Zhang, Y. Chen, Link Prediction Based on Graph Neural Networks, NeurIPS 2018 spotlight".
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryArchitecture
KeywordsComputer vision
Stars674
Forks72
Contributors7
Created date2021-05-05
Updated date2026-09-27
Stars in 1 day0
Stars in 7 days0
Rank15,167
Previous rank14,988
Rank change-179
7-day stars rank14,841
Previous 7-day stars rank14,857
7-day stars rank change16
Total stars rank15,320
Previous total stars rank15,288
Total stars rank change-32
README summary

Self-Supervised Learning with Vision Transformers By Zhenda Xie\*, Yutong Lin\*, Zhuliang Yao, Zheng Zhang, Qi Dai, Yue Cao and Han Hu This repo is the official implementation of "Self-Supervised Learning with Swin Transformers". **A important feature of this codebase is to include as one of the backbones, such that we can evaluate the transferring performance of the learnt representations on down-stream tasks of object detection and semantic segmentation. ** This evaluation is usually not included in previous works

due to the use of ViT/DeiT, which has not been well tamed for down-stream tasks. It currently includes code and models for the following tasks: **Self-Supervised Learning and Linear Evaluation**: Included in this repo. **Transferring Performance on Object Detection/Instance Segmentation**: See Swin Transformer for Object Detection. **Transferring Performance on Semantic Segmentation**: See Swin Transformer for Semantic Segmentation. Highlights **Include down-stream evaluation**: the to evaluate the transferring performance on down-stream tasks for SSL using Transformers

**Small tricks**: significantly less tricks than previous works, such as MoCo v3 and DINO **High accuracy on ImageNet-1K linear evaluation**: 72. 5 (DINO) using DeiT-S/16 and 300 epoch pre-training Updates ***05/13/2021*** 1. Self-Supervised models with DeiT-Small on ImageNet-1K (MoBY-DeiT-Small-300Ep-Pretrained, MoBY-DeiT-Small-300Ep-Linear) are provided. The supporting code and config for self-supervised learning with DeiT-Small are provided. Self-Supervised Pre-training models on ImageNet

-1K (MoBY-Swin-T-300Ep-Pretrained, MoBY-Swin-T-300Ep-Linear) are provided. The supported code and models for self-supervised pre-training and ImageNet-1K linear evaluation, COCO object detection and ADE20K semantic segmentation are provided. Introduction MoBY: a self-supervised learning approach by combining MoCo v2 and BYOL **MoBY** (the name stands for **Mo**Co v2 with **BY**OL) is initially described in arxiv, which is a combination of two popular self-supervised learning approaches: MoCo v2 and

BYOL. It inherits the momentum design, the key queue, and the contrastive loss used in MoCo v2, and inherits the asymmetric encoders, asymmetric data augmentations and the momentum scheduler in BYOL. **MoBY** achieves reasonably high accuracy on ImageNet-1K linear evaluation: 72. 3\% top-1 accuracy using DeiT and Swin-T, respectively, by 300-epoch training. The performance is on par with recent works of MoCo v3 and DINO which adopt DeiT as the backbone, but with much lighter tricks

. Swin Transformer as a backbone **Swin Transformer** (the name stands for **S**hifted **win**dow) is initially described in arxiv, which capably serves as a general-purpose backbone for computer vision. It achieves strong performance on COCO object detection ( and on test-dev) and ADE20K semantic segmentation ( on val), surpassing previous models by a large margin. We involve Swin Transformer as one of backbones to evaluate the transferring performance on down-stream tasks such as object detection. This differentiate this

codebase with other approaches studying SSL on Transformer architectures. 2 | Here | | MoBY | Swin-T | 100 | 28M | 4. 9 | TBA | | MoBY

Frequently asked questions

How many stars and forks are recorded?

SwinTransformer/Transformer-SSL has 674 stars and 72 forks.

What is the repository rank?

SwinTransformer/Transformer-SSL is ranked 15,167.

What language and category are recorded?

SwinTransformer/Transformer-SSL has 674 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

SwinTransformer/Transformer-SSL is compared with bahjat-kawar/ddrm, ranked 15,169 with 674 stars.

README

Self-Supervised Learning with Vision Transformers

By Zhenda Xie*, Yutong Lin*, Zhuliang Yao, Zheng Zhang, Qi Dai, Yue Cao and Han Hu

This repo is the official implementation of "Self-Supervised Learning with Swin Transformers".

A important feature of this codebase is to include Swin Transformer as one of the backbones, such that we can evaluate the transferring performance of the learnt representations on down-stream tasks of object detection and semantic segmentation. This evaluation is usually not included in previous works due to the use of ViT/DeiT, which has not been well tamed for down-stream tasks.

It currently includes code and models for the following tasks:

Self-Supervised Learning and Linear Evaluation: Included in this repo. See get_started.md for a quick start.

Transferring Performance on Object Detection/Instance Segmentation: See Swin Transformer for Object Detection.

Transferring Performance on Semantic Segmentation: See Swin Transformer for Semantic Segmentation.

Highlights

  • Include down-stream evaluation: the first work to evaluate the transferring performance on down-stream tasks for SSL using Transformers
  • Small tricks: significantly less tricks than previous works, such as MoCo v3 and DINO
  • High accuracy on ImageNet-1K linear evaluation: 72.8 vs 72.5 (MoCo v3) vs 72.5 (DINO) using DeiT-S/16 and 300 epoch pre-training

Updates

05/13/2021

  1. Self-Supervised models with DeiT-Small on ImageNet-1K (MoBY-DeiT-Small-300Ep-Pretrained, MoBY-DeiT-Small-300Ep-Linear) are provided.
  2. The supporting code and config for self-supervised learning with DeiT-Small are provided.

05/11/2021

Initial Commits:

  1. Self-Supervised Pre-training models on ImageNet-1K (MoBY-Swin-T-300Ep-Pretrained, MoBY-Swin-T-300Ep-Linear) are provided.
  2. The supported code and models for self-supervised pre-training and ImageNet-1K linear evaluation, COCO object detection and ADE20K semantic segmentation are provided.

Introduction

MoBY: a self-supervised learning approach by combining MoCo v2 and BYOL

MoBY (the name MoBY stands for MoCo v2 with BYOL) is initially described in arxiv, which is a combination of two popular self-supervised learning approaches: MoCo v2 and BYOL. It inherits the momentum design, the key queue, and the contrastive loss used in MoCo v2, and inherits the asymmetric encoders, asymmetric data augmentations and the momentum scheduler in BYOL.

MoBY achieves reasonably high accuracy on ImageNet-1K linear evaluation: 72.8% and 75.3% top-1 accuracy using DeiT and Swin-T, respectively, by 300-epoch training. The performance is on par with recent works of MoCo v3 and DINO which adopt DeiT as the backbone, but with much lighter tricks.

Swin Transformer as a backbone

Swin Transformer (the name Swin stands for Shifted window) is initially described in arxiv, which capably serves as a general-purpose backbone for computer vision. It achieves strong performance on COCO object detection (58.7 box AP and 51.1 mask AP on test-dev) and ADE20K semantic segmentation (53.5 mIoU on val), surpassing previous models by a large margin.

We involve Swin Transformer as one of backbones to evaluate the transferring performance on down-stream tasks such as object detection. This differentiate this codebase with other approaches studying SSL on Transformer architectures.

ImageNet-1K linear evaluation

Method Architecture Epochs Params FLOPs img/s Top-1 Accuracy Pre-trained Checkpoint Linear Checkpoint
Supervised Swin-T 300 28M 4.5G 755.2 81.2 Here
MoBY Swin-T 100 28M 4.5G 755.2 70.9 TBA
MoBY1 Swin-T 100 28M 4.5G 755.2 72.0 TBA
MoBY DeiT-S 300 22M 4.6G 940.4 72.8 GoogleDrive/GitHub/Baidu GoogleDrive/GitHub/Baidu
MoBY Swin-T 300 28M 4.5G 755.2 75.3 GoogleDrive/GitHub/Baidu GoogleDrive/GitHub/Baidu
  • 1 denotes the result of MoBY which has adopted a trick from MoCo v3 that replace theLayerNorm layers before the MLP blocks by BatchNorm.

  • Access code for baidu is moby.

Transferring to Downstream Tasks

COCO Object Detection (2017 val)

Backbone Method Model Schd. box mAP mask mAP Params FLOPs
Swin-T Mask R-CNN Sup. 1x 43.7 39.8 48M 267G
Swin-T Mask R-CNN MoBY 1x 43.6 39.6 48M 267G
Swin-T Mask R-CNN Sup. 3x 46.0 41.6 48M 267G
Swin-T Mask R-CNN MoBY 3x 46.0 41.7 48M 267G
Swin-T Cascade Mask R-CNN Sup. 1x 48.1 41.7 86M 745G
Swin-T Cascade Mask R-CNN MoBY 1x 48.1 41.5 86M 745G
Swin-T Cascade Mask R-CNN Sup. 3x 50.4 43.7 86M 745G
Swin-T Cascade Mask R-CNN MoBY 3x 50.2 43.5 86M 745G

ADE20K Semantic Segmentation (val)

Backbone Method Model Crop Size Schd. mIoU mIoU (ms+flip) Params FLOPs
Swin-T UPerNet Sup. 512x512 160K 44.51 45.81 60M 945G
Swin-T UPerNet MoBY 512x512 160K 44.06 45.58 60M 945G

Citing MoBY and Swin

MoBY

@article{xie2021moby,
  title={Self-Supervised Learning with Swin Transformers}, 
  author={Zhenda Xie and Yutong Lin and Zhuliang Yao and Zheng Zhang and Qi Dai and Yue Cao and Han Hu},
  journal={arXiv preprint arXiv:2105.04553},
  year={2021}
}

Swin Transformer

@article{liu2021Swin,
  title={Swin Transformer: Hierarchical Vision Transformer using Shifted Windows},
  author={Liu, Ze and Lin, Yutong and Cao, Yue and Hu, Han and Wei, Yixuan and Zhang, Zheng and Lin, Stephen and Guo, Baining},
  journal={arXiv preprint arXiv:2103.14030},
  year={2021}
}

Getting Started

Nearby in the ranking
Similar items