Skip to content

Release Notes

1.0.2 [2026-08-21]

Fixes:

  • Fixed repository merge settings to better align with CI expectations.

1.0.1 [2026-08-19]

Fixes:

  • Fixed SSRF vulnerability in download_model by restricting URL schemes to http and https only.

Maintenance:

  • Added .gitattributes for Git LFS tracking of pre-trained model .zip files.
  • Updated manifest classification and gear metadata.

1.0.0 [2026-04-23]

Enhancements:

  • Upgraded from nnunetv1 to nnunetv2 for inference, enabling the use of the latest nnU-Net architecture (nnUNetResEncUNetMPlans).
  • Bundled ten pre-trained weights (Medical Segmentation Decathlon datasets Dataset001_BrainTumour through Dataset010_Colon) directly into the gear, eliminating the need to download models at runtime.
  • Added pretrained_models/hierarchy_curator_training.py script for training nnunetv2 models on Flywheel using the Hierarchy Curator.
  • Added get_pretrained_model() utility to install bundled pre-trained model zip archives at inference time.

Fixes:

  • Fixed process_file_name() to cast input_path to str before applying the regex matcher, preventing a TypeError on Path objects.
  • Fixed nested else/if in split_input_as_needed() to use elif, removing unreachable code path.
  • Copied input files to the work directory before processing to work around Flywheel's restriction on modifying the input directory.

Maintenance:

  • Migrated from flywheel-gear-toolkit / GearToolkitContext to fw-gear / GearContext.
  • Migrated from poetry to uv for dependency management and build system (hatchling).
  • Upgraded base image from flywheel/nnunetv1_base:0.2.0 to flywheel/python:3.12-wolfi-build with a multi-stage Dockerfile.
  • Upgraded python runtime from 3.11 to 3.12.
  • Renamed package from fw_gear_nnunetv1 to fw_gear_nnunet throughout.
  • Updated CI configuration to use a larger runner with a 4h timeout for gear tests.
  • Updated tests to use fw-gear mocks and added @pytest.mark.skipif guard for nnunetv2-dependent tests.
  • Added LICENSE and NOTICES files.

Documentation:

  • Rewrote README.md to document nnunetv2 models, updated dataset list, workflow steps, and license references.
  • Updated CONTRIBUTING.md to replace poetry instructions with uv equivalents and expanded pre-commit hook descriptions.

Breaking Changes:

  • Renamed gear from nnunetv1 to nnunet; any workflows referencing the gear by name will need to be updated.
  • Renamed Python package from fw_gear_nnunetv1 to fw_gear_nnunet.

0.1.2 [2024-11-07]

Enhancements:

  • Added support for up to 4 input modalities (modality_0 through modality_3), enabling multi-modal inference workflows.
  • Expanded pretrained_model options 1 to 10, covering Tasks 001–010 (brain tumour, heart, liver, hippocampus, prostate, lung, pancreas, hepatic vessel, spleen, and colon).
  • Added automatic 4D NIfTI input splitting into separate 3D modality volumes via new split_input_as_needed() utility.
  • Added automatic input filename correction to comply with .*_000[0-9].nii.gz format required by nnUNet_predict.
  • Added model download functionality via new download_model() utility, fetching pre-trained models from Zenodo at runtime.
  • Added input validation to ensure the number of provided modalities matches the selected model's expected count before inference.
  • Added dynamic model_url to QC metadata output, replacing a hardcoded Task004_Hippocampus URL.

Fixes:

  • Fixed nnUNet_predict subprocess call to use subprocess.check_output() with error handling, replacing silent subprocess.run() that did not detect failures.
  • Fixed parse_config to skip modality inputs that are not provided (i.e., when context.get_input_path() returns None), preventing None values from entering the modality inputs dictionary.

Maintenance:

  • Updated base Docker image from flywheel/nnunetv1_base:0.1.0 to flywheel/nnunetv1_base:0.2.0.
  • Extracted input preparation and filename correction logic from main.py into new fw_gear_nnunetv1/utils.py module.
  • Refactored run() in main.py to accept a pre-prepared input_folder instead of raw modality_inputs and work_folder arguments.
  • Updated run.py to orchestrate input preparation and model download before calling run().
  • Updated and expanded test coverage in tests/test_main.py and tests/test_parser.py; added new tests/test_utils.py with comprehensive tests for utility functions.
  • Updated pyproject.toml license field to reflect dual-license (Apache 2.0 for nnUNet source, MIT for the remainder of the gear).

Documentation:

  • Updated README.md to document all 4 input modalities, 10 pretrained model options, debug config option, and improved workflow description.
  • Updated README.md citations to include two additional references for pretrained models and the Medical Segmentation Decathlon dataset.
  • Added license section to README.md clarifying dual-license terms.
  • Updated manifest.json citation field to include all three references.

0.1.1 [2024-09-26]

Enhancements:

  • Added nnUNet v1 inference gear supporting Task004_Hippocampus pretrained model on NIfTI input files.
  • Added automatic filename normalization to comply with nnUNet's .*_0000.nii.gz input format requirement.
  • Added QC metadata attachment to output files with pass/fail state based on inference exit code. Maintenance:
  • Added Dockerfile using flywheel/nnunetv1_base:0.1.0 as base image with python 3.11 runtime.
  • Added CI/CD pipeline configuration via .gitlab-ci.yml.
  • Added pre-commit hooks for linting and testing with ruff, pytest, hadolint, markdownlint, yamllint, and jsonlint.
  • Added pyproject.toml with poetry build system, depending on flywheel-gear-toolkit ^0.6 and flywheel-sdk ^18.
  • Added unit tests for run() and parse_config() functions.

Documentation:

  • Added README.md with gear overview, inputs, config, outputs, and workflow.
  • Added CONTRIBUTING.md with development setup and contribution guidelines.
  • Added FAQ.md as a placeholder for frequently asked questions.