https://github.com/amazon-science/crossnorm-selfnorm
CrossNorm and SelfNorm for Generalization under Distribution Shifts, ICCV 2021
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.1%) to scientific vocabulary
Keywords
Repository
CrossNorm and SelfNorm for Generalization under Distribution Shifts, ICCV 2021
Basic Info
Statistics
- Stars: 129
- Watchers: 2
- Forks: 7
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
CrossNorm (CN) and SelfNorm (SN) (Accepted at ICCV 2021)
This is the official PyTorch implementation of our CNSN paper, in which we propose CrossNorm (CN) and SelfNorm (SN), two simple, effective, and complementary normalization techniques to improve generalization robustness under distribution shifts.
@article{tang2021cnsn,
title={CrossNorm and SelfNorm for Generalization under Distribution Shifts},
author={Zhiqiang Tang, Yunhe Gao, Yi Zhu, Zhi Zhang, Mu Li, Dimitris Metaxas},
journal={arXiv preprint arXiv:2102.02811},
year={2021}
}
Install dependencies
shell
conda create --name cnsn python=3.7
conda activate cnsn
conda install numpy
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
Prepare datasets
Download CIFAR-10-C and CIFAR-100-C datasets with:
mkdir -p ./data curl -O https://zenodo.org/record/2535967/files/CIFAR-10-C.tar curl -O https://zenodo.org/record/3555552/files/CIFAR-100-C.tar tar -xvf CIFAR-100-C.tar -C data/ tar -xvf CIFAR-10-C.tar -C data/Download ImageNet-C with:
mkdir -p ./data/ImageNet-C curl -O https://zenodo.org/record/2235448/files/blur.tar curl -O https://zenodo.org/record/2235448/files/digital.tar curl -O https://zenodo.org/record/2235448/files/noise.tar curl -O https://zenodo.org/record/2235448/files/weather.tar tar -xvf blur.tar -C data/ImageNet-C tar -xvf digital.tar -C data/ImageNet-C tar -xvf noise.tar -C data/ImageNet-C tar -xvf weather.tar -C data/ImageNet-C
Usage
We have included sample scripts in cifar10-scripts, cifar100-scripts, and imagenet-scripts.
For example, there are 5 scripts for CIFAR-100 and WideResNet:
./cifar100-scripts/wideresnet/run-cn.sh./cifar100-scripts/wideresnet/run-sn.sh./cifar100-scripts/wideresnet/run-cnsn.sh./cifar100-scripts/wideresnet/run-cnsn-consist.sh(Use CNSN with JSD consistency regularization)./cifar100-scripts/wideresnet/run-cnsn-augmix.sh(Use CNSN with AugMix)
Pretrained models
- Pretrained ResNet-50 ImageNet classifiers are available:
- ResNet-50 + CN
- ResNet-50 + SN
- ResNet-50 + CNSN
Results of the above 4 ResNet-50 models on ImageNet:
| | +CN | +SN | +CNSN | +CNSN+IBN+AugMix | | :-------- |:---------:| :----:| :----:| :---: | | Top-1 err | 23.3 | 23.7 | 23.3 | 22.3 | | mCE | 75.1 | 73.8 | 69.7 | 62.8 |
Owner
- Name: Amazon Science
- Login: amazon-science
- Kind: organization
- Website: https://amazon.science
- Twitter: AmazonScience
- Repositories: 80
- Profile: https://github.com/amazon-science
GitHub Events
Total
- Watch event: 2
- Fork event: 1
Last Year
- Watch event: 2
- Fork event: 1
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 4
- Total pull requests: 3
- Average time to close issues: 4 days
- Average time to close pull requests: 3 days
- Total issue authors: 4
- Total pull request authors: 1
- Average comments per issue: 0.75
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- weix-liu (1)
- liyuke65535 (1)
- uulsj (1)
- Genie-Kim (1)
Pull Request Authors
- yhygao (3)