Skip to main content

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

  1. You submit a folder under algorithms/<your-slug>/ via a pull request: your code (run.sh + scripts), a stage: declaration, and an environment — a base image (image:) or a small Dockerfile. Your code is mounted, not baked, and toolboxes are downloaded when the environment is built. (See docs/submitting.md.)
  2. QSM-CI runs it on the challenge data inside your container (/input/output), with no network and no access to the answer.
  3. 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).
  4. 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

qsm_ci-0.1.0.tar.gz (65.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qsm_ci-0.1.0-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

Details for the file qsm_ci-0.1.0.tar.gz.

File metadata

  • Download URL: qsm_ci-0.1.0.tar.gz
  • Upload date:
  • Size: 65.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qsm_ci-0.1.0.tar.gz
Algorithm Hash digest
SHA256 487dd0a4bf62cfdc68dac92f32ad54d21a93e14de5803d21713abd7b7f5c5aed
MD5 938e5eaa302aa690b19971831d6d5a8e
BLAKE2b-256 34b16542e0fad9a5c62bb6334c977bdec8be42474cf236da06f4efa49e279641

See more details on using hashes here.

Provenance

The following attestation bundles were made for qsm_ci-0.1.0.tar.gz:

Publisher: release.yml on QSMxT/QSM-CI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qsm_ci-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qsm_ci-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qsm_ci-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2f9a24cadee089cf76f0c56af116348ffa32e6088d0bf3db4c4366956bcc2e4
MD5 4a4d37920f0119fcc1619ec0c90f2d46
BLAKE2b-256 c3a7a99a9d53aff6158734bb995f4c114f0631e1818435ed491fcaf06c286d5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for qsm_ci-0.1.0-py3-none-any.whl:

Publisher: release.yml on QSMxT/QSM-CI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page