Skip to content
Back to skills

Fastmri

ASecurity

"Use fastMRI for MRI reconstruction data loading, MRI operators,

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
datapythondebuggingbackend

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill fastmri --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fastmri?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fastmri
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-fastmri/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-fastmri)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fastmri
description: "Use fastMRI for MRI reconstruction data loading, MRI operators,
  reconstruction models, Lightning training, evaluation, and submission
  preparation."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# fastMRI

Use this repo skill when a task involves the `fastmri` Python package, fastMRI HDF5 k-space data, MRI reconstruction baselines, U-Net/VarNet models, PyTorch Lightning training, or fastMRI metric/submission-style outputs.

This skill targets the packaged `fastmri` library and selected self-contained workflows distilled from the repository examples. It assumes the user provides local fastMRI-style HDF5 data, checkpoints, and any optional external tools; it does not download datasets, model weights, or BART automatically.

## Start Here

1. Confirm the active Python can import `fastmri`; for data/model workflows also confirm `torch`, `h5py`, `pytorch_lightning`, `torchmetrics`, and `requests` if `fastmri.data` is imported.
2. Identify the task family from the route table below, then open the matching sub-skill before writing code or commands.
3. Keep original fastMRI data/checkpoints outside the skill; use bundled scripts only as helpers and generate user outputs in user-specified locations.
4. Prefer CPU-safe smoke checks and tiny fixtures before long training, GPU inference, external downloads, or leaderboard packaging.

## Sub-Skill Routes

| User intent | Read |
| --- | --- |
| Inspect `.h5` keys, choose `singlecoil` vs `multicoil`, build `SliceDataset`/`CombinedSliceDataset`, configure masks/transforms, or debug cache/sample-rate issues. | [data-loading](sub-skills/data-loading/SKILL.md) |
| Use complex tensor conventions, centered FFT/IFFT, `rss`, crop/normalization helpers, `SSIMLoss`, or array metric shape checks. | [mri-operators](sub-skills/mri-operators/SKILL.md) |
| Instantiate/debug U-Net, VarNet, NormUnet, AdaptiveVarNet, LOUPE/policy modules, tiny model shape checks, or offline pretrained inference. | [model-architectures](sub-skills/model-architectures/SKILL.md) |
| Build PyTorch Lightning train/test workflows with `FastMriDataModule`, `UnetModule`, `VarNetModule`, checkpoints, CPU fast-dev, DDP, or `combine_train_val`. | [lightning-training](sub-skills/lightning-training/SKILL.md) |
| Save reconstructions, validate prediction HDF5 files, compute MSE/NMSE/PSNR/SSIM, build zero-filled baselines, convert v2 filenames, or prepare submission outputs. | [evaluation-submission](sub-skills/evaluation-submission/SKILL.md) |

## Shared References and Scripts

- [Package overview](references/package-overview.md) summarizes package scope, installed dependency facts, selected examples, and advanced/example-only branches.
- [Troubleshooting](references/troubleshooting.md) covers cross-cutting install/import, optional dependency, data, backend, and workflow failure modes.
- [Repo provenance](references/repo-provenance.md) records the source commit, package version, dirty-state baseline, and evidence paths used to create this skill.
- [Routing metadata](references/repo-routing-metadata.json) provides structured scenario placement for managed `repo-skills-router` import.
- [Environment check script](scripts/check_fastmri_environment.py) prints a JSON import/backend/dependency summary for the active Python environment.

## Common Task Patterns

- Data-to-training: read [data-loading](sub-skills/data-loading/SKILL.md), then [lightning-training](sub-skills/lightning-training/SKILL.md), then [evaluation-submission](sub-skills/evaluation-submission/SKILL.md) for output validation.
- Tensor/operator debugging: read [mri-operators](sub-skills/mri-operators/SKILL.md) first, then route to [model-architectures](sub-skills/model-architectures/SKILL.md) if the error happens inside U-Net/VarNet.
- Pretrained inference: read [model-architectures](sub-skills/model-architectures/SKILL.md) and require a user-supplied local checkpoint unless the user explicitly authorizes network downloads.
- Submission preparation: read [evaluation-submission](sub-skills/evaluation-submission/SKILL.md), validate prediction files before metrics, and treat public leaderboard upload as unavailable unless the user confirms a current destination.

## Important Caveats

- The package metadata declares core dependencies but this checkout's `fastmri.data` also imports `requests`; install `requests` if `ModuleNotFoundError: requests` appears.
- The README notes a historical `h5py`/HDF5 memory leak concern for tensor conversion; if users see memory growth during large HDF5 reads, prefer a conda `h5py` build with an older compatible HDF5 as described in the package docs.
- The repository examples often assume GPU/DDP defaults, repo-local `fastmri_dirs.yaml`, public checkpoint downloads, or separate pinned environments. The skill distills those workflows into explicit-path, offline-safe guidance instead of depending on original example files.
- `banding_removal/`, BART compressed sensing, adaptive VarNet, feature VarNet, RadiologyJohnson2022, notebooks, annotation visualization, external prostate data/code, and raw data manifests are reference or advanced evidence unless a user explicitly asks for those areas and accepts their extra dependencies.

Files in this skill

  • SKILL.md5.1 KB
  • references/package-overview.md2.7 KB
  • references/repo-provenance.md2.5 KB
  • references/repo-routing-metadata.json420 B
  • references/troubleshooting.md4.1 KB
  • scripts/check_fastmri_environment.py2.5 KB
  • sub-skills/data-loading/SKILL.md3.3 KB
  • sub-skills/data-loading/references/api-reference.md7.5 KB
  • sub-skills/data-loading/references/data-formats.md4.1 KB
  • sub-skills/data-loading/references/troubleshooting.md6.8 KB
  • sub-skills/data-loading/scripts/create_tiny_fastmri_h5.py4.1 KB
  • sub-skills/data-loading/scripts/inspect_fastmri_h5.py6.6 KB
  • sub-skills/evaluation-submission/SKILL.md3.1 KB
  • sub-skills/evaluation-submission/references/evaluation-reference.md3.8 KB
  • sub-skills/evaluation-submission/references/submission-workflows.md4.1 KB
  • sub-skills/evaluation-submission/references/troubleshooting.md3.6 KB
  • sub-skills/evaluation-submission/scripts/validate_reconstructions.py5.7 KB
  • sub-skills/evaluation-submission/scripts/zero_filled_reconstruction.py2.9 KB
  • sub-skills/lightning-training/SKILL.md2.7 KB
  • sub-skills/lightning-training/references/api-reference.md8.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.