Skip to main content

fastMRI Prostate T2 Coil Classification

This project builds a T2-only classification experiment for the fastMRI prostate dataset. It follows the dataset paper's slice-level PI-RADS classification setup and official patient split, but replaces the released RSS images with selected coil images from the middle T2 acquisition.

The experiment compares:

  • a real-valued CNN that receives only coil image amplitudes;
  • a complex-valued CNN that receives the same selected coils as complex images.

PI-RADS labels are binarized as in the paper: PI-RADS > 2 is clinically significant prostate cancer.

Install

From PyPI:

python -m pip install prost-t2-classification

Confirm the console command is available:

prost-t2 --help

For development from a local checkout:

python -m venv .venv
.\.venv\Scripts\python -m pip install -U pip
.\.venv\Scripts\python -m pip install -e ".[dev]"

For CUDA training, install the PyTorch build that matches your GPU/driver before or after the editable install.

Full Pipeline

The full command prompts for storage locations if you omit them:

prost-t2 run --download-script .\prostate_download_script.txt

Equivalent non-interactive form:

prost-t2 run `
  --download-script .\prostate_download_script.txt `
  --download-dir D:\fastmri_prostate\archives `
  --extract-dir D:\fastmri_prostate\raw `
  --recon-dir D:\fastmri_prostate\recon_t2 `
  --npz-dir D:\fastmri_prostate\npz_t2_coils `
  --runs-dir D:\fastmri_prostate\runs

To stop after downloading, reconstruction, and NPZ preparation, skip training:

prost-t2 run `
  --download-script .\prostate_download_script.txt `
  --download-dir D:\fastmri_prostate\archives `
  --extract-dir D:\fastmri_prostate\raw `
  --recon-dir D:\fastmri_prostate\recon_t2 `
  --npz-dir D:\fastmri_prostate\npz_t2_coils `
  --skip-train

Individual Stages

Download labels and T2 tarballs only:

prost-t2 download --download-script .\prostate_download_script.txt --download-dir D:\fastmri_prostate\archives --no-extract

Download and extract labels plus T2 tarballs:

prost-t2 download --download-script .\prostate_download_script.txt --download-dir D:\fastmri_prostate\archives --extract-dir D:\fastmri_prostate\raw

Run GRAPPA/IFFT reconstruction with fastmri-tools:

prost-t2 reconstruct --raw-root D:\fastmri_prostate\raw --recon-dir D:\fastmri_prostate\recon_t2

Create compact NPZ samples from the middle acquisition and top-energy coils:

prost-t2 make-npz --labels D:\fastmri_prostate\raw --recon-dir D:\fastmri_prostate\recon_t2 --npz-dir D:\fastmri_prostate\npz_t2_coils

Prepare NPZ files from extracted raw data without training:

prost-t2 prepare-npz `
  --raw-root D:\fastmri_prostate\raw `
  --recon-dir D:\fastmri_prostate\recon_t2 `
  --npz-dir D:\fastmri_prostate\npz_t2_coils

Train both models:

prost-t2 train --manifest D:\fastmri_prostate\npz_t2_coils\manifest.csv --runs-dir D:\fastmri_prostate\runs --mode both

Data Decisions

  • The official data_split column is used directly, and patient leakage across train/validation/test is checked before training.
  • T2 kspace is reconstructed through fastmri-tools, producing complex image_complex arrays.
  • The acquisition dimension is reduced by selecting the middle acquisition (shape[0] // 2).
  • Up to five coils are selected per patient volume using highest image-space energy, measured on the selected acquisition across all slices.
  • NPZ files store image_complex with shape (coils, height, width) plus patient, slice, split, and coil metadata.

Publishing

Releases are published to PyPI by GitHub Actions using PyPI Trusted Publishing, so the repository does not need a long-lived PyPI API token.

Create a pending publisher on PyPI with these values:

  • PyPI project name: prost-t2-classification
  • GitHub owner: meis-01
  • GitHub repository: prost_t2_classification
  • Workflow file: publish.yml
  • GitHub environment: pypi

Then bump __version__ in src/prost_t2_classification/__init__.py, commit the change, and push a matching tag:

git tag v0.1.0
git push origin v0.1.0

The publish workflow checks that the tag matches the package version before it uploads the wheel and source distribution.

Metadata

Release files for prost-t2-classification 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prost-t2-classification 0.1.0
File Size Uploaded Provenance Actions
prost_t2_classification-0.1.0.tar.gz 17.5 kB With provenance Details for prost_t2_classification-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prost-t2-classification 0.1.0
File Interpreter ABI Platform Actions
prost_t2_classification-0.1.0-py3-none-any.whl Python 3 none any Details for prost_t2_classification-0.1.0-py3-none-any.whl

Total release size: 36.5 kB

Release files / prost_t2_classification-0.1.0.tar.gz

Download URL prost_t2_classification-0.1.0.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8339cf07d7757005081ef830e7dad99674ec11b38db21dc48b16d7257f9ece44
BLAKE2b-256 checksum
How to use checksums
5a800ee5ab6ce732d1bb53556b333cffe3778cf588fe1dd85f246986165b2067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

Release files / prost_t2_classification-0.1.0-py3-none-any.whl

Download URL prost_t2_classification-0.1.0-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6c6273d3bc05f1eed93af30da18035d18408feb3dc16a9663cda17e9b5cffc2
BLAKE2b-256 checksum
How to use checksums
c8497ecbf396b832d4b3ca9f5064ac8275b4449e2f1876d6c1a966fa82af67b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

Security for prost-t2-classification 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for prost_t2_classification-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page