Sign inSign up

petermcgor/nnunetv2

By petermcgor

Updated 4 months ago

Image
Machine learning & AI
0

2.2K

petermcgor/nnunetv2 repository overview

nnUNet Docker Images Repository

This repository contains different versions of nnUNet Docker images. Most versions are designed to run standard nnUNet with different configurations.

Available Versions

  • Standard versions: Various tags for running standard nnUNet implementation
  • :0.4.0-bottleneck: Special version based on v0.4.0 that includes bottleneck features extraction capability (currently the only version supporting bottleneck features)

Bottleneck Features Version (0.4.0-bottleneck)

This special version extends nnUNet v0.4.0 implementation with additional bottleneck features functionality in the inference process. Currently, the bottleneck feature extraction is only implemented for this specific version.

Pre-packaged Models in 0.4.0-bottleneck
  • Includes Dataset301_CL_Multisite models trained with BlobLoss and ADAM-based trainer
  • Located at /opt/nnunet_resources/
Using Custom Models in 0.4.0-bottleneck

To use different models:

  1. Bind your local nnUNet_results directory to /opt/nnunet_resources/ in the Docker container
  2. Ensure your folder structure follows the standard nnUNet organization:
/opt/nnunet_resources/
└── nnUNet_results/
    └── Dataset[XXX]_[Name]/
        └── [your model files]
New Features in 0.4.0-bottleneck

Additional parameters for nnUNetv2_predict:

  • --bottleneck_features: Flag to obtain per patch bottleneck features
  • --average_folds_patches_mirrors: Three boolean values to control averaging over folds, patches, and mirrors
  • --bottleneck_features_ext: Extension for bottleneck features (choices: 'npz', 'npy', 'pt', default: 'npz')
  • --no_flip_bottleneck: If set, captured bottleneck features are NOT un-flipped along the same axes used for TTA mirroring before aggregation.
Usage Example for 0.4.0-bottleneck
# Using pre-packaged Dataset301_CL_Multisite model
nnUNetv2_predict -d Dataset301_CL_Multisite \
                 -i /path/to/input/data \
                 -o /path/to/output/predictions \
                 -f 0 1 2 3 4 \
                 -tr nnUNetTrainerBlobLossAdam3en4 \
                 -c 3d_fullres \
                 -npp 15 \
                 -nps 15 \
                 --save_probabilities \
                 --bottleneck_features
Data Mounting in 0.4.0-bottleneck

Before running inference:

  1. Mount your input data directory into the Docker container
  2. Mount an output directory for predictions
  3. If using custom models, mount your nnUNet_results directory

Example Docker run command:

docker run -v /local/path/to/input:/data/input \
           -v /local/path/to/output:/data/output \
           -v /local/path/to/nnUNet_results:/opt/nnunet_resources/nnUNet_results \
           your-image-name:0.4.0-bottleneck \
           nnUNetv2_predict [your-parameters]
Using Custom Models in 0.4.0-bottleneck

To use your own models instead of the pre-packaged Dataset301:

  1. Modify the -d parameter to match your dataset number/name
  2. Adjust the -tr parameter to match your trainer
  3. Ensure your model files are properly mounted in the container

For the complete list of available parameters and their descriptions, use:

nnUNetv2_predict -h
LICENSE

License: CC BY-NC 4.0 (Non-Commercial)

For commercial use, contact: [email protected]⁠ Full license: https://github.com/Medical-Image-Analysis-Laboratory/Bench-Explain_DL_Cortical-Lesions/blob/main/LICENSE⁠

Tag summary

Content type

Image

Digest

sha256:811994f38

Size

17.1 GB

Last updated

4 months ago

docker pull petermcgor/nnunetv2:0.4.0-bottleneck