File size: 2,449 Bytes
4498aec
 
 
 
 
 
 
 
 
 
1a03077
4498aec
 
 
 
 
 
1a03077
4498aec
 
1a03077
4498aec
 
 
 
 
 
 
1a03077
4498aec
1a03077
 
 
 
 
4498aec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1a03077
4498aec
1a03077
4498aec
1a03077
4498aec
 
 
 
1a03077
 
 
 
 
 
4498aec
1a03077
 
 
4498aec
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
license: cc-by-4.0
task_categories:
  - image-to-image
  - unconditional-image-generation
tags:
  - microscopy
  - electron-microscopy
  - STEM
  - materials-science
  - webdataset
size_categories:
  - 10K<n<100K
configs:
  - config_name: default
    data_files:
      - split: train
        path: "train-*.tar"
---

# Warwick STEM Dataset (WebDataset)

A collection of 19,769 experimental scanning transmission electron microscopy (STEM) images from the University of Warwick, spanning hundreds of diverse materials projects collected between 2010 and 2018.

## Dataset Description

This dataset contains experimental STEM images originally published as part of the [Warwick Electron Microscopy Datasets](https://github.com/Jeffrey-Ede/datasets) by Jeffrey Ede. The images cover a wide range of materials and imaging conditions, making them useful for self-supervised pre-training of microscopy foundation models.

## Format

WebDataset format: 170 TAR shards (~1 GB each), 160 GB total.

Each sample in a shard contains:
- `{idx:06d}.tif` — 32-bit float TIFF image
- `{idx:06d}.json` — metadata

### Metadata Fields

| Field | Type | Description |
|-------|------|-------------|
| `original_filename` | string | Original filename from the Warwick dataset |
| `width` | int | Image width in pixels |
| `height` | int | Image height in pixels |
| `dtype` | string | Pixel data type (float32) |
| `min_value` | float | Minimum pixel intensity |
| `max_value` | float | Maximum pixel intensity |
| `mean_value` | float | Mean pixel intensity |
| `std_value` | float | Standard deviation of pixel intensity |

### Image Properties

- **Count:** 19,769
- **Format:** 32-bit float TIFF
- **Resolutions:** Mixed — 2048x2048 (40%), 1024x1024 (34%), 512x512 (16%), other (10%)
- **Modality:** STEM (various detector configurations)
- **Instruments:** Multiple instruments at the University of Warwick (2010–2018)

## Usage

```python
import webdataset as wds
from torch.utils.data import DataLoader

url = "path/to/warwick_stem_wds/train-{0000..0169}.tar"
dataset = wds.WebDataset(url).decode().shuffle(1000)
dataloader = DataLoader(dataset, batch_size=32, num_workers=4)

for sample in dataloader:
    image = sample[".tif"]
    metadata = sample[".json"]
```

## Source

Original data from [Jeffrey-Ede/datasets](https://github.com/Jeffrey-Ede/datasets) on GitHub. Please cite the original work if you use this dataset.

## License

CC-BY-4.0