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 --mode Invivo
(Invivo or Exvivo)
--structure Structure to segment --structure Parenchyma
(Parenchyma,
Airways, Vascular,
ParenchymaAirways,
All, Lobes)
--input Path to the input image --input ~/data/scan_patient.nrrd
(.nii, .nii.gz, .mha,
.nrrd)
--output Output directory for the --output ~/predictions
prediction (default:
prediction)
--models_dir Path to store or search --models_dir ~/models
for models
--name Final name of the --name segmentation_parenchyma
prediction file (without
extension)
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
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.2.4.tar.gz.
File metadata
- Download URL: nnunet_package-0.2.4.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
690dfa744a52cf175fbe75241432801c71523a6f0b3d0242b6344ff7cfeddf15
|
|
| MD5 |
25151ed1998ea5e399f373ede860709e
|
|
| BLAKE2b-256 |
9c8efa2a941db6c59b41c30823aaf4ae4c5fe6784ee99c240d9e18bc68b49fc0
|
File details
Details for the file nnunet_package-0.2.4-py3-none-any.whl.
File metadata
- Download URL: nnunet_package-0.2.4-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 |
86c8fee20ba528d0309b2091e5111f59e62baf8547aed0960c7f1f465093c477
|
|
| MD5 |
3878e55c155b0fdfa3f95576f0b05b9e
|
|
| BLAKE2b-256 |
ba344f2345a4b53d0c7f93c5c24d39cce6861b1c0479c40fdb6e2fdd1a2b604d
|