anonneuripsuser commited on
Commit
0a0a685
·
verified ·
1 Parent(s): 26562c2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +140 -0
README.md ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - reinforcement-learning
5
+ tags:
6
+ - stem-microscopy
7
+ - electron-microscopy
8
+ - materials-science
9
+ - gymnasium
10
+ - benchmark
11
+ - dose-efficiency
12
+ - autonomous-microscopy
13
+ pretty_name: STEMGym Benchmark
14
+ size_categories:
15
+ - 1K<n<10K
16
+ ---
17
+
18
+ # STEMGym: A Gymnasium Environment for Benchmarking Dose-Efficient Autonomous Scanning Transmission Electron Microscopy
19
+
20
+ A Gymnasium-based benchmark environment for evaluating autonomous dose-efficient scanning transmission electron microscopy (STEM) agents.
21
+
22
+ ## Dataset Description
23
+
24
+ STEMGym provides simulated STEM specimens as HDF5 world files. Each world contains:
25
+
26
+ - **Overview image**: Low-magnification survey of the full specimen
27
+ - **Tile grid**: High-resolution STEM-HAADF images (128x128 px tiles, 4px overlap, stride=124) arranged in an 8x8 grid
28
+ - **Ground truth annotations**: Atom positions, defect types, and phase maps for scoring
29
+ - **Metadata**: Pixel size, accelerating voltage, detector geometry, material parameters
30
+
31
+ ### Materials
32
+
33
+ | Material | Zone Axis | FOV | Defect Types | Task |
34
+ |----------|-----------|-----|-------------|------|
35
+ | SrTiO3 | [001] | ~100 nm | O vacancies clustered along grain boundary | Defect Census |
36
+ | BaTiO3 | [001] | ~100 nm | Cubic/tetragonal phase boundaries + O vacancies | Phase Mapping + Defect Census |
37
+ | SiGe | [110] | ~50 nm | Ge substitutions concentrated in one quadrant | Targeted Characterization |
38
+ | GaN | [11-20] | ~80 nm | InGaN quantum-well substitutions | Defect Census |
39
+ | Pt nanoparticles | — | ~60 nm | Pt nanoparticles on amorphous carbon | Particle Census |
40
+
41
+ ### Difficulty Levels
42
+
43
+ Each material is provided at three difficulty levels:
44
+
45
+ | Level | Vacancy Rate | Phonon Configs | Dose (e-/A^2) |
46
+ |-------|-------------|----------------|---------------|
47
+ | Easy | 5% | 4 | 1e4 |
48
+ | Medium | 3% | 8 | 5e3 |
49
+ | Hard | 1% | 16 | 1e3 |
50
+
51
+ ## Files
52
+
53
+ ### Simulated Worlds (`worlds/`)
54
+
55
+ | File | Material | Difficulty | Size |
56
+ |------|----------|-----------|------|
57
+ | `test_world.h5` | Synthetic (Gaussian blobs) | — | 9.7 MB |
58
+ | `replay_world.h5` | Synthetic (replay validation) | — | 2.5 MB |
59
+ | `srtio3_clustered_easy.h5` | SrTiO3 | Easy | 884 MB |
60
+ | `srtio3_clustered_medium.h5` | SrTiO3 | Medium | 884 MB |
61
+ | `srtio3_clustered_hard.h5` | SrTiO3 | Hard | 885 MB |
62
+ | `batio3_interface_easy.h5` | BaTiO3 | Easy | 911 MB |
63
+ | `batio3_interface_medium.h5` | BaTiO3 | Medium | 911 MB |
64
+ | `batio3_interface_hard.h5` | BaTiO3 | Hard | 911 MB |
65
+ | `sige_gradient_clustered_easy.h5` | SiGe | Easy | 150 MB |
66
+ | `sige_gradient_clustered_medium.h5` | SiGe | Medium | 148 MB |
67
+ | `sige_gradient_clustered_hard.h5` | SiGe | Hard | 147 MB |
68
+ | `gan_easy.h5` | GaN | Easy | 451 MB |
69
+ | `gan_medium.h5` | GaN | Medium | 449 MB |
70
+ | `gan_hard.h5` | GaN | Hard | 448 MB |
71
+ | `pt_nanoparticles_easy.h5` | Pt | Easy | 129 MB |
72
+ | `pt_nanoparticles_medium.h5` | Pt | Medium | 129 MB |
73
+ | `pt_nanoparticles_hard.h5` | Pt | Hard | 129 MB |
74
+
75
+ ### Model Checkpoints (`checkpoints/`)
76
+
77
+ | File | Model | Description | Size |
78
+ |------|-------|-------------|------|
79
+ | `atom_finder.pt` | AtomFinderUNet | Atomic column detection ensemble (3 members) | 88 MB |
80
+ | `defect_classifier.pt` | DefectClassifierCNN | Defect type classification | 1.4 MB |
81
+ | `phase_identifier.pt` | PhaseIdentifierResNet | Material phase identification | 7.4 MB |
82
+ | `dqn_agent.zip` | DQN (SB3) | RL navigation baseline | 0.8 MB |
83
+ | `ppo_agent.zip` | PPO (SB3) | RL navigation baseline | 1.0 MB |
84
+ | `sac_agent.zip` | SAC (SB3) | RL navigation baseline | 8.4 MB |
85
+
86
+ ### Transfer Checkpoints (`checkpoints/transfer/`)
87
+
88
+ Material-specific analyst models trained on individual materials for transfer experiments:
89
+
90
+ | Directory | Contents |
91
+ |-----------|----------|
92
+ | `transfer/srtio3/` | atom_finder.pt, defect_classifier.pt, phase_identifier.pt, training_metadata.json |
93
+ | `transfer/batio3/` | atom_finder.pt, defect_classifier.pt, phase_identifier.pt, training_metadata.json |
94
+ | `transfer/sige/` | atom_finder.pt, defect_classifier.pt, phase_identifier.pt, training_metadata.json |
95
+ | `transfer/gan/` | atom_finder.pt, defect_classifier.pt, phase_identifier.pt, training_metadata.json |
96
+
97
+ ## HDF5 World Format
98
+
99
+ Each world file follows this layout:
100
+
101
+ ```
102
+ /metadata/
103
+ pixel_size_nm # Physical pixel size
104
+ tile_size_px # Tile dimensions (128)
105
+ grid_shape # Grid dimensions (rows, cols)
106
+ fov_nm # Field of view in nm
107
+ scenario # Material/scenario name
108
+ difficulty # easy / medium / hard
109
+ /overview # (H, W) low-res overview image
110
+ /tiles/{row}_{col} # (128, 128) float32 normalized HAADF tiles
111
+ /ground_truth/
112
+ atom_positions # (N, 2) in nm
113
+ atom_types # (N,) int [0=pristine, 1=vacancy, 2=substitution]
114
+ defect_mask # (N,) bool
115
+ defect_types # (N,) str ["pristine"/"vacancy"/"substitution"]
116
+ phase_map # (H, W) int32, optional
117
+ /valid_region # (H, W) bool
118
+ ```
119
+
120
+ ## Usage
121
+
122
+ ```bash
123
+ pip install -e .
124
+ python stem_gym/scripts/download_data.py
125
+ stemgym run --agent raster_equipped --task defect_census --world srtio3_clustered_easy --seeds 3
126
+ ```
127
+
128
+ ## License
129
+
130
+ This dataset is released under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license.
131
+
132
+ ## Citation
133
+
134
+ ```bibtex
135
+ @inproceedings{anonymous2026stemgym,
136
+ title={STEMGym: A Gymnasium Environment for Benchmarking Dose-Efficient Autonomous Scanning Transmission Electron Microscopy},
137
+ author={Anonymous},
138
+ year={2026}
139
+ }
140
+ ```