You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
keyu tian c4d28a1c6a [upd] add notes for 384 training 2 years ago
downstream_d2 [upd] READMEs 2 years ago
downstream_imagenet [upd] add notes for 384 training 2 years ago
downstream_mmdet [upd] READMEs 2 years ago
pretrain [upd] add notes for 384 training 2 years ago
.gitignore [initial commit] 2 years ago
INSTALL.md [upd] READMEs 2 years ago
LICENSE [upd] add more comments; change the LICENSE 2 years ago
README.md [upd] add notes for 384 training 2 years ago

README.md

SparK: BERT/MAE-style Pretraining on Any Convolutional Networks Reddit Twitter

Implementation of the paper Designing BERT for Convolutional Networks: Sparse and Hierarchical Masked Modeling.

SOTA  OpenReview  arXiv

🔥 News

📺 Video demo

https://user-images.githubusercontent.com/6366788/213662770-5f814de0-cbe8-48d9-8235-e8907fd81e0e.mp4

What's new here?

🔥 On ResNets, generative pre-training surpasses contrastive learning for the first time:

🔥 ConvNeXt gains more from pre-training than Swin-Transformer, up to +3.5 points:

🔥 Larger models benefit more from SparK pre-training, showing a scaling behavior:

🔥 Pre-trained model can make reasonable predictions:

See our paper for more analysis, discussions, and evaluations.

Catalog

  • Pre-training code
  • Fine-tuning code
  • Colab visualization playground
  • Weights & visualization playground on Huggingface
  • Weights in timm

ImageNet-1k results and pre-trained networks weights

Note: for network definitions, we directly use timm.models.ResNet and official ConvNeXt. reso.: the image resolution; acc@1: IN1k fine-tuned acc (top-1)

arch. reso. acc@1 #params flops weights on google drive
ResNet50 224 80.6 26M 4.1G resnet50_1kpretrained_timm_style.pth
ResNet101 224 82.2 45M 7.9G resnet101_1kpretrained_timm_style.pth
ResNet152 224 82.7 60M 11.6G resnet152_1kpretrained_timm_style.pth
ResNet200 224 83.1 65M 15.1G resnet200_1kpretrained_timm_style.pth
ConvNeXt-S 224 84.1 50M 8.7G convnextS_1kpretrained_official_style.pth
ConvNeXt-B 224 84.8 89M 15.4G convnextB_1kpretrained_official_style.pth
ConvNeXt-L 224 85.4 198M 34.4G convnextL_1kpretrained_official_style.pth
ConvNeXt-L 384 86.0 198M 101.0G convnextL_384_1kpretrained_official_style.pth
L-with-decoder 384 86.0 198M 101.0G cnxL384_withdecoder_1kpretrained_spark_style.pth

Installation

For pre-training and fine-tuning on ImageNet-1k, we highly recommended you to use torch==1.10.0, torchvision==0.11.1, and timm==0.5.4.

Check INSTALL.md to install all dependencies for pre-training and ImageNet fine-tuning.

Pre-training

See pretrain/ to pre-train models on ImageNet-1k.

Fine-tuning

Acknowledgement

We referred to these useful codebases:

License

This project is under the MIT license. See LICENSE for more details.

Citation

If you found this project useful, you may consider staring , or citing us 📖:

@Article{tian2023designing,
  author  = {Keyu Tian and Yi Jiang and Qishuai Diao and Chen Lin and Liwei Wang and Zehuan Yuan},
  title   = {Designing BERT for Convolutional Networks: Sparse and Hierarchical Masked Modeling},
  journal = {arXiv:2301.03580},
  year    = {2023},
}