Package to use nnUNet on 3D Slicer
Project description
LungSegmentation nnUNetv2 Prediction Script
A Python script to easily run nnUNetv2 lung segmentation predictions on medical images. Automatic model download, file preparation for prediction, and result renaming included.
Features
- Automatic download and extraction of models from a URL.
- Preparation of
dataset.jsonfor nnUNet prediction. - Conversion of input images to
.nrrdif necessary. - Prediction execution with detailed logs.
- Automatic cleanup of temporary files.
- Automatic renaming of the final prediction file.
Requirements
Before running the script, make sure you have installed and configured the following:
git clone https://github.com/FlorianDAVAUX/nnUNet_package.git
cd nnUNet_package
pip install -e .
Usage
| Option | Description | Example |
|---|---|---|
--mode |
Prediction mode (Invivo or Exvivo) |
--mode Invivo |
--structure |
Structure to segment (Parenchyma, Airways, Vascular, ParenchymaAirways, All, Lobes) |
--structure Parenchyma |
--input |
Path to the input image (.nii, .nii.gz, .mha, .nrrd) | --input ~/data/scan_patient.nrrd |
--output |
Output directory for the prediction (default: prediction) |
--output ~/predictions |
--models_dir |
Path to store or search for models | --models_dir ~/models |
--name |
Final name of the prediction file (without extension) | --name segmentation_parenchyma |
Full Example
nnunet_predict --mode Invivo --structure Parenchyma --input ~/data/scan_patient.nrrd --output ~/predictions --models_dir ~/models --name segmentation_parenchyma
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nnunet_package-0.3.6.tar.gz
(6.0 kB
view details)
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 nnunet_package-0.3.6.tar.gz.
File metadata
- Download URL: nnunet_package-0.3.6.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f8f3dad827200da260487dac3db7b40293fb531414406e5200102122cba8367
|
|
| MD5 |
433ed79d536ca0a912786a9972d6a5e3
|
|
| BLAKE2b-256 |
147f5ab506a31ae4bfb0c9eb34debeea88311f7d378cdfa63f95fbd718621a6f
|
File details
Details for the file nnunet_package-0.3.6-py3-none-any.whl.
File metadata
- Download URL: nnunet_package-0.3.6-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ad8177bb852ec05024bd232b47ff796b76f0736aa7a50e2596b7c6917991465
|
|
| MD5 |
c3d4f1795514159648db359a97c6b742
|
|
| BLAKE2b-256 |
1bad83f6c86fda70ed62a714c37d6dc094a5d678568ba762c5cbd7e092d2c28c
|