Datasets:
|
Download README.md from kurbanintelligencelab/stemgym: direct link, hf CLI and curl.
- Browser
- Download file 7.69 kB
-
https://huggingface.co/datasets/kurbanintelligencelab/stemgym/resolve/main/README.md
- Command line
-
hf download hf://datasets/kurbanintelligencelab/stemgym/README.md
-
curl -L -o README.md https://huggingface.co/datasets/kurbanintelligencelab/stemgym/resolve/main/README.md
7.69 kB
| license: cc-by-4.0 | |
| language: | |
| - en | |
| task_categories: | |
| - reinforcement-learning | |
| tags: | |
| - stem-microscopy | |
| - electron-microscopy | |
| - materials-science | |
| - gymnasium | |
| - benchmark | |
| - dose-efficiency | |
| - autonomous-microscopy | |
| - simulation | |
| pretty_name: STEMGym | |
| size_categories: | |
| - 10K<n<100K | |
| viewer: false | |
| # STEMGym: Benchmarking Sequential Decision-Making under Dose Budgets in Autonomous Electron Microscopy | |
| STEMGym is a benchmark for sequential decision-making under dose budgets in autonomous electron microscopy. This repository provides simulated specimen worlds, analyst checkpoints, and a reproducible reference evaluation. | |
| **Authors:** Can Polat, Mustafa Kurban, Erchin Serpedin, and Hasan Kurban. | |
| [Code](https://github.com/KurbanIntelligenceLab/STEMGym/tree/main) · [Preserved results](https://github.com/KurbanIntelligenceLab/STEMGym/tree/main/results/manuscript) · [Pinned data revision](https://huggingface.co/datasets/kurbanintelligencelab/stemgym/tree/aa12b7380fed7a4362a18aa67df1ea135f7e15ff) | |
| ## Release and scientific scope | |
| The reference data revision is `aa12b7380fed7a4362a18aa67df1ea135f7e15ff`. Download this pinned revision to reproduce the reference study. File hashes identify the exact world and checkpoint bytes. | |
| The release has **15 material worlds** across five systems and three difficulty tiers. The benchmark core comprises **13 coordinate-bounds-consistent worlds and 13,600 overlapping tiles**. Hard SrTiO3 and hard Pt/C are retained as additional records with annotations outside the declared field bounds. The two synthetic test/replay fixtures are separate from benchmark results. The size category above counts image tiles, not independent specimens or atom annotations. | |
| Coordinate bounds do not establish physical calibration. The preserved image audit records sampling and registration issues, including repeated zero-intensity bands. Use the [calibration audit](https://github.com/KurbanIntelligenceLab/STEMGym/tree/main/results/manuscript/calibration_audit.json) and [release validation](https://github.com/KurbanIntelligenceLab/STEMGym/tree/main/results/manuscript/release_validation.json) when interpreting these records. Projected crystalline annotations retain per-atom lateral coordinates and can coincide along a column; they are not necessarily separately resolvable image peaks. Pt/C records represent particle centroids and particle attributes. | |
| ## Material inventory | |
| The table describes the 13 core worlds. Grid sizes and fields below are stored metadata. Dimensions use height × width; fields are in nominal nanometers. | |
| | Filename prefix under `worlds/` | Material | Grid | Tiles per world | Nominal field (nm) | Core tiers | | |
| |---|---|---|---:|---|---| | |
| | `srtio3_clustered` | SrTiO3 | 40 × 40 | 1600 | 99.96 × 99.96 | easy, medium | | |
| | `batio3_interface` | BaTiO3 | 40 × 40 | 1600 | 99.82 × 99.82 | easy, medium, hard | | |
| | `sige_gradient_clustered` | SiGe | 20 × 20 | 400 | 49.96 × 49.96 | easy, medium, hard | | |
| | `gan` | GaN | 20 × 20 | 400 | 49.78 × 50.26 | easy, medium, hard | | |
| | `pt_nanoparticles` | Pt/C | 40 × 40 | 1600 | 100.00 × 100.00 | easy, medium | | |
| The additional hard SrTiO3 and Pt/C records declare fields of 50.08 × 50.08 nm and 50.00 × 50.00 nm, respectively, with 0.01 nm pixels; their annotations exceed those bounds. | |
| Each prefix has `_easy.h5`, `_medium.h5`, and `_hard.h5` files. All material tiles are 128 × 128 pixels, with 4-pixel overlap and 124-pixel stride. Stored material intensities are normalized to [0, 1]; the runtime applies dose-dependent Poisson noise. Dose units in the benchmark should not be read as independently validated physical fluence. | |
| [`release_inventory.csv`](release_inventory.csv) lists the 15 worlds, two fixtures, and three reference checkpoints with byte sizes, SHA-256 hashes, roles, and immutable download URLs. [`release_manifest.json`](release_manifest.json) is the original full release manifest. | |
| ## Analyst checkpoints | |
| The reference evaluation uses `checkpoints/atom_finder.pt`, `checkpoints/defect_classifier.pt`, and `checkpoints/phase_identifier.pt`. The runtime can fall back to heuristic analysis when a trained head degenerates; see the code and preserved evaluation records for that behavior. | |
| ## HDF5 layout | |
| ```text | |
| /metadata # HDF5 group attributes: pixel_size_nm, tile_size_px, | |
| # overlap_px, grid_shape, fov_nm, world_shape_px, | |
| # scenario, difficulty | |
| /overview # low-resolution context image | |
| /tiles/{row}_{col} # individual 128 × 128 image datasets | |
| /ground_truth/ # atom_positions, atom_species, atom_types, | |
| # defect_mask, defect_types; material-specific fields | |
| /valid_region # spatial validity mask | |
| ``` | |
| Optional ground-truth arrays include phase maps, composition fields, and particle attributes. Read each file's actual dtypes, shapes, and labels rather than assuming a uniform annotation schema. HDF5 world containers and PyTorch checkpoints are consumed by STEMGym; the automatic tabular Dataset Viewer is disabled. | |
| ## Usage with uv | |
| Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then install the code: | |
| ```sh | |
| git clone https://github.com/KurbanIntelligenceLab/STEMGym.git | |
| cd STEMGym | |
| uv sync --locked | |
| uv run --locked stemgym-download | |
| uv run --locked python reproducibility/validate_release.py | |
| uv run --locked python reproducibility/verify_reference.py | |
| ``` | |
| The downloader checks SHA-256 hashes and pins the reference data revision. `stemgym-download --worlds`, `--checkpoints`, or `--test-only` select subsets. The downloaded files go under `data/` and `checkpoints/`. Existing mismatched files are rejected rather than overwritten. | |
| ## Reference study and new evaluations | |
| The preserved study has **220 episodes**: five configurations on four easy crystalline worlds with ten seeds each, plus trained raster on medium and hard BaTiO3 with ten seeds each. The configurations are raster with heuristic analysis, raster with trained analysis, random with trained analysis, GP intensity with trained analysis, and GP defect guidance with trained analysis. Each episode acquires 50 distinct tiles for 5,000 dose units, with scoring every five acquisitions. | |
| The reported JSON results, integrity manifest, exact evaluator, and source snapshot are in [the code repository](https://github.com/KurbanIntelligenceLab/STEMGym/tree/main/results/manuscript). Use the evaluator and runtime in `reference_source.zip` to reproduce the reported implementation. The current evaluator records protocol version 2 and its own source identity. | |
| ```sh | |
| uv run --locked python reproducibility/build_figures.py | |
| uv run --locked python reproducibility/verify_reference.py --artifacts-dir results/generated | |
| uv run --locked python reproducibility/evaluate_reference.py --output results/runs/reference.json | |
| uv run --locked python reproducibility/build_figures.py --results results/runs/reference.json --output-dir results/generated-current | |
| uv run --locked python reproducibility/verify_reference.py --results results/runs/reference.json --artifacts-dir results/generated-current | |
| ``` | |
| ## License and citation | |
| Data: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Code: [MIT](https://github.com/KurbanIntelligenceLab/STEMGym/tree/main/LICENSE). | |
| ```bibtex | |
| @misc{stemgym2026, | |
| title = {STEMGym: Benchmarking Sequential Decision-Making under Dose Budgets in Autonomous Electron Microscopy}, | |
| author = {Polat, Can and Kurban, Mustafa and Serpedin, Erchin and Kurban, Hasan}, | |
| year = {2026}, | |
| url = {https://huggingface.co/datasets/kurbanintelligencelab/stemgym} | |
| } | |
| ``` | |