Submit, test, and score QSM reconstruction algorithms for the QSM-CI challenge.
Project description
QSM-CI
A challenge platform for Quantitative Susceptibility Mapping (QSM) reconstruction.
Submit a QSM algorithm — in any language — as a container. QSM-CI runs it automatically on standardized data, scores it the same way the QSM.rs CI does, and publishes the results to an interactive, sortable leaderboard.
QSM is a pipeline — field-mapping → background field removal (BFR) → dipole inversion — so QSM-CI is stage-aware: you can submit a single stage, or a span for methods that cross boundaries. Each stage is scored on its own and in combination with others, so you can see both "which inversion is best" and "which BFR+inversion pairing wins."
How it works
- You submit a folder under
algorithms/<your-slug>/via a pull request: your code (run.sh+ scripts), astage:declaration, and an environment — a base image (image:) or a smallDockerfile. Your code is mounted, not baked, and toolboxes are downloaded when the environment is built. (See docs/submitting.md.) - QSM-CI runs it on the challenge data inside your container (
/input→/output), with no network and no access to the answer. - QSM-CI scores it against held-out ground truth with
qsm-eval(the QSM.rs metrics), both isolated (fed the true input boundary) and composed (chained with other stages). - Results appear on the leaderboard — per-stage tables and a BFR × inversion combination matrix.
The contract
Your container implements one stage and reads/writes canonical artifacts (all fields & χ in ppm):
stage: |
Consumes (/input) |
Produces (/output) |
|---|---|---|
field-mapping |
phase, magnitude, mask, params | totalfield |
bfr |
totalfield, mask, params | localfield |
dipole |
localfield, mask, params | chimap |
spans: unwrap+bfr, bfr+dipole, end-to-end |
… | … |
Full details in CONTRACT.md and the machine-readable stages.yml. MATLAB is welcome via the license-free MATLAB Runtime — see docs/matlab.md.
Repository layout
| Path | What it is |
|---|---|
CONTRACT.md, stages.yml |
The frozen contract; the artifact & stage registry |
algorithms/<slug>/ |
One submission each (metadata + image + run.sh + stage:) |
eval/ |
qsm-eval — the Python scorer (metrics ported from QSM.rs) |
scripts/pipeline.py |
Isolated + composed evaluation runner (local or containerized) |
scripts/pack_dataset.py |
qsm-forward BIDS → QSM-CI artifact layout |
data/sim/, data/invivo/ |
Datasets; ground truth held out on OSF |
results/index.json |
Per-run scores + Hugging Face volume URLs; feeds the leaderboard (the only committed result) |
web/ |
Static leaderboard + NiiVue viewer (GitHub Pages) |
.github/workflows/ |
ci (CLI/runner smoke tests), evaluate (per-PR), score (change-triggered scoring + volume publish), pages (deploy), matlab-compile, hf-check (volume-publish smoke test) |
Results storage. NIfTI volumes are never committed — they're uploaded to a public Hugging
Face dataset repo (scripts/publish_volumes.py; secret HF_TOKEN + repo variable
HF_VOLUMES_REPO) and the viewer loads them by URL.
Only the small results/index.json lives in git. The score workflow runs on change (a changed
algorithm → its combos; changed scorer/orchestration → everything), never on a weekly timer.
Local development
# 1. generate a dev phantom (see data/sim/README.md for the qsm-forward command), then:
python scripts/pack_dataset.py /tmp/BIDS data/sim/dev
# 2. run the full isolated + composed evaluation over all reference submissions
pip install -r eval/requirements.txt
python scripts/pipeline.py --dataset data/sim/dev --mode both
# 3. preview the website (reads results/index.json)
python -m http.server -d web 8000 # → http://localhost:8000
Status
Working end-to-end on a realistic head phantom (data/sim/scoring/, 7T, 164×205×205): the stage
model, scorer (full region metrics), composition matrix, containerized runner (--network none),
and website. Reference submissions include Python (tkd, tikhonov, sharp), the full QSMxT/QSM.rs
engine set (all BFR + dipole methods, HARPERELLA, TGV, QSMART), and a MATLAB template compiled to
the free MATLAB Runtime (matlab-tkd).
Before opening the challenge: fix the canonical head-phantom qsm-forward invocation and upload its
held-out ground truth to OSF; wire the ARC runner + OSF_TOKEN secrets; cross-check qsm-eval
against QSM.rs on that phantom; add a field-mapping reference so the matrix starts from raw phase.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qsm_ci-0.1.1.tar.gz.
File metadata
- Download URL: qsm_ci-0.1.1.tar.gz
- Upload date:
- Size: 67.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09714466c9f6f0388c8976778b5afd0f59a62661ca3eef07ba4fd7e04827d3f0
|
|
| MD5 |
e2ed36c11b214d7417fa900d626ad752
|
|
| BLAKE2b-256 |
041d0bae10ad9ed8fe0da70a88e2feb8375f9b661a944f263112a1c7d579071c
|
Provenance
The following attestation bundles were made for qsm_ci-0.1.1.tar.gz:
Publisher:
release.yml on QSMxT/QSM-CI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qsm_ci-0.1.1.tar.gz -
Subject digest:
09714466c9f6f0388c8976778b5afd0f59a62661ca3eef07ba4fd7e04827d3f0 - Sigstore transparency entry: 2179170813
- Sigstore integration time:
-
Permalink:
QSMxT/QSM-CI@a2d2359d332973222c15458ebd10881b94795229 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/QSMxT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a2d2359d332973222c15458ebd10881b94795229 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qsm_ci-0.1.1-py3-none-any.whl.
File metadata
- Download URL: qsm_ci-0.1.1-py3-none-any.whl
- Upload date:
- Size: 48.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
575887f879c3da069c560e48c1508fd644cb5e70bc0280c6b544bd9f0ad7ae1d
|
|
| MD5 |
9f5859989256cf311227be1608881237
|
|
| BLAKE2b-256 |
6ac0e07f38874d4dc0445541a04d9efcd390685dcaa747458c339a2e6eb35483
|
Provenance
The following attestation bundles were made for qsm_ci-0.1.1-py3-none-any.whl:
Publisher:
release.yml on QSMxT/QSM-CI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qsm_ci-0.1.1-py3-none-any.whl -
Subject digest:
575887f879c3da069c560e48c1508fd644cb5e70bc0280c6b544bd9f0ad7ae1d - Sigstore transparency entry: 2179170896
- Sigstore integration time:
-
Permalink:
QSMxT/QSM-CI@a2d2359d332973222c15458ebd10881b94795229 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/QSMxT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a2d2359d332973222c15458ebd10881b94795229 -
Trigger Event:
release
-
Statement type: