WNJXYK commited on
Commit
4f11858
·
verified ·
1 Parent(s): d6d747b

publish resnet50 ImageNet source model (v1.0)

Browse files
Files changed (4) hide show
  1. LICENSE +5 -0
  2. README.md +86 -0
  3. config.json +23 -0
  4. model.safetensors +3 -0
LICENSE ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ BSD 3-Clause License
2
+
3
+ This mirror is generated from torchvision's ResNet-50 ImageNet-1K
4
+ weights and is intended to reproduce the RobustBench Standard_R50
5
+ ImageNet-C source-model baseline.
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: bsd-3-clause
3
+ library_name: pytorch
4
+ tags: [image-classification, imagenet, imagenet-c, resnet50, robustness, tta]
5
+ pipeline_tag: image-classification
6
+ ---
7
+
8
+ # TTA-ImageNet-ResNet50
9
+
10
+ Mirror of the standard **ImageNet-1K ResNet-50** source model used for
11
+ ImageNet-C test-time adaptation baselines.
12
+
13
+ This checkpoint is generated from torchvision
14
+ `ResNet50_Weights.IMAGENET1K_V1`. It matches the model definition used by
15
+ RobustBench's ImageNet-C `Standard_R50` entry:
16
+ `torchvision.models.resnet50(pretrained=True)` with ImageNet mean/std
17
+ normalization applied outside the backbone.
18
+
19
+ ## Why This Model
20
+
21
+ - TENT's official example stack depends on RobustBench for datasets and
22
+ pre-trained models.
23
+ - EATA reports ImageNet-C severity-5 results with ResNet-50.
24
+ - SAR evaluates ImageNet-C with ResNet-50 and ViT variants; the classic
25
+ ResNet-50 backbone remains the baseline anchor.
26
+
27
+ For more recent "wild" or batch-size-1 settings, papers often add
28
+ ResNet-50-GN and ViT-B/LN variants. This repo uses the BN ResNet-50 as the
29
+ canonical ImageNet-C source checkpoint because it matches the original
30
+ TENT/EATA-style setting and exposes BN affine parameters for TENT.
31
+
32
+ ## Model Details
33
+
34
+ - **Upstream equivalent**: RobustBench `Standard_R50` for ImageNet corruptions
35
+ - **Torchvision weights**: `ResNet50_Weights.IMAGENET1K_V1`
36
+ - **Arch**: `resnet50`
37
+ - **Params**: 25,557,032
38
+ - **Clean ImageNet val accuracy**: not evaluated
39
+ - **Input**: RGB image, resized/cropped to 224, then normalized with
40
+ mean `[0.485, 0.456, 0.406]` and std `[0.229, 0.224, 0.225]`.
41
+
42
+ ## Usage
43
+
44
+ ```python
45
+ from huggingface_hub import hf_hub_download
46
+ from safetensors.torch import load_file
47
+ from torchvision.models import resnet50
48
+
49
+ path = hf_hub_download("WNJXYK/TTA-ImageNet-ResNet50", "model.safetensors", revision="v1.0")
50
+ model = resnet50(weights=None, num_classes=1000)
51
+ model.load_state_dict(load_file(path))
52
+ ```
53
+
54
+ Inside **TTA-Evaluation-Harness**:
55
+
56
+ ```yaml
57
+ # configs/source_models/resnet50_imagenet.yaml
58
+ framework: torchvision_hf
59
+ arch: resnet50
60
+ hf_repo: WNJXYK/TTA-ImageNet-ResNet50
61
+ revision: v1.0
62
+ ```
63
+
64
+ ## Citations
65
+
66
+ ```bibtex
67
+ @inproceedings{he2016deep,
68
+ title={Deep Residual Learning for Image Recognition},
69
+ author={He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
70
+ booktitle={CVPR}, year={2016}
71
+ }
72
+
73
+ @inproceedings{hendrycks2019benchmarking,
74
+ title={Benchmarking Neural Network Robustness to Common Corruptions and Perturbations},
75
+ author={Hendrycks, Dan and Dietterich, Thomas},
76
+ booktitle={ICLR}, year={2019}
77
+ }
78
+
79
+ @inproceedings{croce2021robustbench,
80
+ title={RobustBench: a standardized adversarial robustness benchmark},
81
+ author={Croce, Francesco and Andriushchenko, Maksym and Sehwag, Vikash
82
+ and Debenedetti, Edoardo and Flammarion, Nicolas and Chiang, Mung
83
+ and Mittal, Prateek and Hein, Matthias},
84
+ booktitle={NeurIPS Datasets and Benchmarks Track}, year={2021}
85
+ }
86
+ ```
config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "arch": "resnet50",
3
+ "num_classes": 1000,
4
+ "input_size": 224,
5
+ "normalization_mean": [
6
+ 0.485,
7
+ 0.456,
8
+ 0.406
9
+ ],
10
+ "normalization_std": [
11
+ 0.229,
12
+ 0.224,
13
+ 0.225
14
+ ],
15
+ "upstream": {
16
+ "robustbench_model_name": "Standard_R50",
17
+ "robustbench_dataset": "imagenet",
18
+ "robustbench_threat_model": "corruptions",
19
+ "torchvision_weights": "ResNet50_Weights.IMAGENET1K_V1"
20
+ },
21
+ "clean_imagenet_val": null,
22
+ "n_params": 25557032
23
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d061a3c593d795bfe682d9b152bafbcf550579873492def3515b46db1189888
3
+ size 102469840