Dataset Viewer
Auto-converted to Parquet Duplicate
file_name
stringlengths
22
57
image_id
stringclasses
500 values
arm
stringclasses
4 values
corruption
stringclasses
16 values
severity
int64
0
5
jpeg_quality
float64
75
90
wnid
stringclasses
10 values
imagenet_index
int64
0
701
data/base/img_0001.png
img_0001
clean_png
clean
0
null
n01440764
0
data/base/img_0002.png
img_0002
clean_png
clean
0
null
n01440764
0
data/base/img_0003.png
img_0003
clean_png
clean
0
null
n01440764
0
data/base/img_0004.png
img_0004
clean_png
clean
0
null
n01440764
0
data/base/img_0005.png
img_0005
clean_png
clean
0
null
n01440764
0
data/base/img_0006.png
img_0006
clean_png
clean
0
null
n01440764
0
data/base/img_0007.png
img_0007
clean_png
clean
0
null
n01440764
0
data/base/img_0008.png
img_0008
clean_png
clean
0
null
n01440764
0
data/base/img_0009.png
img_0009
clean_png
clean
0
null
n01440764
0
data/base/img_0010.png
img_0010
clean_png
clean
0
null
n01440764
0
data/base/img_0011.png
img_0011
clean_png
clean
0
null
n01440764
0
data/base/img_0012.png
img_0012
clean_png
clean
0
null
n01440764
0
data/base/img_0013.png
img_0013
clean_png
clean
0
null
n01440764
0
data/base/img_0014.png
img_0014
clean_png
clean
0
null
n01440764
0
data/base/img_0015.png
img_0015
clean_png
clean
0
null
n01440764
0
data/base/img_0016.png
img_0016
clean_png
clean
0
null
n01440764
0
data/base/img_0017.png
img_0017
clean_png
clean
0
null
n01440764
0
data/base/img_0018.png
img_0018
clean_png
clean
0
null
n01440764
0
data/base/img_0019.png
img_0019
clean_png
clean
0
null
n01440764
0
data/base/img_0020.png
img_0020
clean_png
clean
0
null
n01440764
0
data/base/img_0021.png
img_0021
clean_png
clean
0
null
n01440764
0
data/base/img_0022.png
img_0022
clean_png
clean
0
null
n01440764
0
data/base/img_0023.png
img_0023
clean_png
clean
0
null
n01440764
0
data/base/img_0024.png
img_0024
clean_png
clean
0
null
n01440764
0
data/base/img_0025.png
img_0025
clean_png
clean
0
null
n01440764
0
data/base/img_0026.png
img_0026
clean_png
clean
0
null
n01440764
0
data/base/img_0027.png
img_0027
clean_png
clean
0
null
n01440764
0
data/base/img_0028.png
img_0028
clean_png
clean
0
null
n01440764
0
data/base/img_0029.png
img_0029
clean_png
clean
0
null
n01440764
0
data/base/img_0030.png
img_0030
clean_png
clean
0
null
n01440764
0
data/base/img_0031.png
img_0031
clean_png
clean
0
null
n01440764
0
data/base/img_0032.png
img_0032
clean_png
clean
0
null
n01440764
0
data/base/img_0033.png
img_0033
clean_png
clean
0
null
n01440764
0
data/base/img_0034.png
img_0034
clean_png
clean
0
null
n01440764
0
data/base/img_0035.png
img_0035
clean_png
clean
0
null
n01440764
0
data/base/img_0036.png
img_0036
clean_png
clean
0
null
n01440764
0
data/base/img_0037.png
img_0037
clean_png
clean
0
null
n01440764
0
data/base/img_0038.png
img_0038
clean_png
clean
0
null
n01440764
0
data/base/img_0039.png
img_0039
clean_png
clean
0
null
n01440764
0
data/base/img_0040.png
img_0040
clean_png
clean
0
null
n01440764
0
data/base/img_0041.png
img_0041
clean_png
clean
0
null
n01440764
0
data/base/img_0042.png
img_0042
clean_png
clean
0
null
n01440764
0
data/base/img_0043.png
img_0043
clean_png
clean
0
null
n01440764
0
data/base/img_0044.png
img_0044
clean_png
clean
0
null
n01440764
0
data/base/img_0045.png
img_0045
clean_png
clean
0
null
n01440764
0
data/base/img_0046.png
img_0046
clean_png
clean
0
null
n01440764
0
data/base/img_0047.png
img_0047
clean_png
clean
0
null
n01440764
0
data/base/img_0048.png
img_0048
clean_png
clean
0
null
n01440764
0
data/base/img_0049.png
img_0049
clean_png
clean
0
null
n01440764
0
data/base/img_0050.png
img_0050
clean_png
clean
0
null
n01440764
0
data/base/img_0051.png
img_0051
clean_png
clean
0
null
n02102040
217
data/base/img_0052.png
img_0052
clean_png
clean
0
null
n02102040
217
data/base/img_0053.png
img_0053
clean_png
clean
0
null
n02102040
217
data/base/img_0054.png
img_0054
clean_png
clean
0
null
n02102040
217
data/base/img_0055.png
img_0055
clean_png
clean
0
null
n02102040
217
data/base/img_0056.png
img_0056
clean_png
clean
0
null
n02102040
217
data/base/img_0057.png
img_0057
clean_png
clean
0
null
n02102040
217
data/base/img_0058.png
img_0058
clean_png
clean
0
null
n02102040
217
data/base/img_0059.png
img_0059
clean_png
clean
0
null
n02102040
217
data/base/img_0060.png
img_0060
clean_png
clean
0
null
n02102040
217
data/base/img_0061.png
img_0061
clean_png
clean
0
null
n02102040
217
data/base/img_0062.png
img_0062
clean_png
clean
0
null
n02102040
217
data/base/img_0063.png
img_0063
clean_png
clean
0
null
n02102040
217
data/base/img_0064.png
img_0064
clean_png
clean
0
null
n02102040
217
data/base/img_0065.png
img_0065
clean_png
clean
0
null
n02102040
217
data/base/img_0066.png
img_0066
clean_png
clean
0
null
n02102040
217
data/base/img_0067.png
img_0067
clean_png
clean
0
null
n02102040
217
data/base/img_0068.png
img_0068
clean_png
clean
0
null
n02102040
217
data/base/img_0069.png
img_0069
clean_png
clean
0
null
n02102040
217
data/base/img_0070.png
img_0070
clean_png
clean
0
null
n02102040
217
data/base/img_0071.png
img_0071
clean_png
clean
0
null
n02102040
217
data/base/img_0072.png
img_0072
clean_png
clean
0
null
n02102040
217
data/base/img_0073.png
img_0073
clean_png
clean
0
null
n02102040
217
data/base/img_0074.png
img_0074
clean_png
clean
0
null
n02102040
217
data/base/img_0075.png
img_0075
clean_png
clean
0
null
n02102040
217
data/base/img_0076.png
img_0076
clean_png
clean
0
null
n02102040
217
data/base/img_0077.png
img_0077
clean_png
clean
0
null
n02102040
217
data/base/img_0078.png
img_0078
clean_png
clean
0
null
n02102040
217
data/base/img_0079.png
img_0079
clean_png
clean
0
null
n02102040
217
data/base/img_0080.png
img_0080
clean_png
clean
0
null
n02102040
217
data/base/img_0081.png
img_0081
clean_png
clean
0
null
n02102040
217
data/base/img_0082.png
img_0082
clean_png
clean
0
null
n02102040
217
data/base/img_0083.png
img_0083
clean_png
clean
0
null
n02102040
217
data/base/img_0084.png
img_0084
clean_png
clean
0
null
n02102040
217
data/base/img_0085.png
img_0085
clean_png
clean
0
null
n02102040
217
data/base/img_0086.png
img_0086
clean_png
clean
0
null
n02102040
217
data/base/img_0087.png
img_0087
clean_png
clean
0
null
n02102040
217
data/base/img_0088.png
img_0088
clean_png
clean
0
null
n02102040
217
data/base/img_0089.png
img_0089
clean_png
clean
0
null
n02102040
217
data/base/img_0090.png
img_0090
clean_png
clean
0
null
n02102040
217
data/base/img_0091.png
img_0091
clean_png
clean
0
null
n02102040
217
data/base/img_0092.png
img_0092
clean_png
clean
0
null
n02102040
217
data/base/img_0093.png
img_0093
clean_png
clean
0
null
n02102040
217
data/base/img_0094.png
img_0094
clean_png
clean
0
null
n02102040
217
data/base/img_0095.png
img_0095
clean_png
clean
0
null
n02102040
217
data/base/img_0096.png
img_0096
clean_png
clean
0
null
n02102040
217
data/base/img_0097.png
img_0097
clean_png
clean
0
null
n02102040
217
data/base/img_0098.png
img_0098
clean_png
clean
0
null
n02102040
217
data/base/img_0099.png
img_0099
clean_png
clean
0
null
n02102040
217
data/base/img_0100.png
img_0100
clean_png
clean
0
null
n02102040
217
End of preview. Expand in Data Studio

JPEG Re-encoding Confound Control Dataset

A controlled-experiment dataset that isolates one acknowledged-but-unmeasured confound in ImageNet-C. Hendrycks & Dietterich (Benchmarking Neural Network Robustness to Common Corruptions and Perturbations, ICLR 2019, arXiv:1903.12261) save every corrupted image as a lightly compressed JPEG. The benchmark therefore never measures a corruption c applied to an image x in isolation — it measures JPEG(c(x)). This dataset lets you quantify how much of each corruption's reported error is attributable to the corruption versus the final JPEG save step, and whether that leakage differs across corruption families.

The single isolated variable is the save format: the same corrupted pixel array is saved once losslessly (PNG) and once as JPEG. Everything else — image, corruption, severity, random seed — is held identical, so any measured difference is attributable to the JPEG save step and nothing else.

The control structure (four matched arms)

For each base image, reduced once to a canonical 224×224 RGB array:

arm description
clean_png canonical image saved losslessly as PNG — the control arm
clean_jpeg canonical image saved as JPEG at quality q — isolates JPEG acting alone
corrupt_png corrupted array saved losslessly as PNG — the corruption in isolation
corrupt_jpeg the same corrupted array saved as JPEG at quality q — what ImageNet-C stores

The corruption array for a given (image, corruption, severity) is generated exactly once and then saved every way; it is never regenerated per format. That one-array rule is the core of the experiment's validity. The corruption functions are the original ImageNet-C code, used via the imagecorruptions package — the only logic this project adds is Image.save(format='PNG') vs Image.save(format='JPEG', quality=q).

Scope

  • 15 corruptions (families: noise, blur, weather, digital).
  • 3 severities: {1, 3, 5}.
  • 3 JPEG qualities: {75, 85, 90}. Quality 85 is the ImageNet-C default, read directly from make_imagenet_c.py in the Hendrycks repo (save(..., quality=85, optimize=True)); 75 and 90 bracket it so results are not tied to one guess.
  • Base images: the 10-class ImageNette (320px) validation split, selected deterministically from a fixed seed.

Files and layout

data/
  base/<image_id>.png                                # clean_png arm
  clean_saves/jpeg_q<q>/<image_id>.jpg               # clean_jpeg arm
  corrupted/<corruption>/s<severity>/
      png/<image_id>.png                             # corrupt_png arm
      jpeg_q<q>/<image_id>.jpg                        # corrupt_jpeg arm
manifest.csv     # one row per base image: image_id, source_path, wnid, imagenet_index, base_png_path
metadata.csv     # one row per arm file (index over the whole dataset; schema below)
config.yaml      # exact scope knobs used to generate this release

<image_id> (e.g. img_0001) is assigned deterministically at selection time. The base/ PNG doubles as the clean_png arm and is not duplicated.

metadata.csv schema

One row per image file, so the dataset can be filtered without walking the tree:

column meaning
file_name path relative to repo root, e.g. data/corrupted/fog/s3/jpeg_q85/img_0001.jpg
image_id stable id, e.g. img_0001
arm one of clean_png, clean_jpeg, corrupt_png, corrupt_jpeg
corruption corruption name, or clean for the clean arms
severity 1/3/5, or 0 for clean arms
jpeg_quality 75/85/90 for JPEG arms, empty for PNG arms
wnid ImageNet wnid of the source class
imagenet_index ImageNet-1k class index (0–999)

Usage

Pair each *_png arm with the matching *_jpeg arm (same image_id, corruption, severity) and compare model behavior. The intended contrast is corrupt_png vs corrupt_jpeg; the clean_* arms isolate JPEG acting alone (the control).

import pandas as pd
from huggingface_hub import hf_hub_download

repo = "<user>/jpeg-confound-control-dataset"
meta = pd.read_csv(hf_hub_download(repo, "metadata.csv", repo_type="dataset"))

# all matched arms for fog at severity 3, quality 85
fog = meta[(meta.corruption == "fog") & (meta.severity == 3) &
           (meta.arm.isin(["corrupt_png", "corrupt_jpeg"])) &
           (meta.jpeg_quality.isin([85, ""]))]

Or pull the full tree:

from huggingface_hub import snapshot_download
snapshot_download("<user>/jpeg-confound-control-dataset", repo_type="dataset")

Reproducibility

The dataset regenerates byte-identically from the generation code plus the seed in config.yaml: image selection is seeded, and before every corruption an order-independent 32-bit seed is derived from (image_id, corruption, severity) via zlib.crc32. The full generator, evaluator, and analysis are in the code repository (generate.pyevaluate.pyanalyze.py).

Intended use and limitations

  • Intended use: measuring the JPEG save-step confound in corruption-robustness benchmarks; teaching controlled-experiment design. Research only.
  • No lossless ImageNet original exists — ImageNet (and thus ImageNette) source images are themselves JPEG. This source compression is held identical across the PNG and JPEG arms, so it cancels in the comparison; the variable isolated here is the final save-time re-encode, not total JPEG exposure.
  • Base images are the 10-class ImageNette subset with a single canonical crop, so absolute accuracies differ from the full ImageNet-C protocol; the controlled contrast between arms is unaffected.

Licensing and source

  • Images derive from ImageNette, a subset of ImageNet, and are subject to the ImageNet terms of access (non-commercial research use). Redistribute only as permitted by those terms; when in doubt, release code + manifest + a small sample and let users regenerate the full set.
  • Corruption functions: imagecorruptions (Apache-2.0), packaging Hendrycks's original ImageNet-C code.
  • Packaging/generation code: see the code repository's license.

Citation

The corruptions and the confound this dataset measures:

@inproceedings{hendrycks2019benchmarking,
  title     = {Benchmarking Neural Network Robustness to Common Corruptions and Perturbations},
  author    = {Hendrycks, Dan and Dietterich, Thomas},
  booktitle = {International Conference on Learning Representations (ICLR)},
  year      = {2019},
  url       = {https://arxiv.org/abs/1903.12261}
}
Downloads last month
35

Paper for atharvadagaonkar/ImageNet-CJ