NnUnetParams
Configuration parameters for nnU-Net AI model.
Import
import ScriptingApi as api
# Create parameter instance
params = api.NnUnetParams()
Properties
models_dir
Path to the nnU-Net models directory containing trained datasets.
Type: str
dataset
Dataset name or identifier for the model.
Type: str
configuration
Model configuration (e.g., '3d_fullres', '3d_lowres', '3d_lowres_high', '3d_cascade_fullres', '2d'). The default is '3d_fullres'. Custom configurations like '3d_lowres_high' (used by TotalSegmentator dental models) are also supported.
Type: str
device
Processing device ('cpu' or 'gpu'). The default is 'cpu'.
Type: str
folds
List of model folds to use for ensemble prediction. The default is 0 (single fold).
Type: list
npp
Number of parallel processes for preprocessing. The default is 0 (sequential mode).
Type: int
nps
Number of parallel processes for post-processing. The default is 0 (sequential mode).
Type: int
disable_tta
Disable test-time augmentation for faster inference. The default is false (tta enabled).
Type: bool
trainer
Trainer class name used during model training. The default is 'nnUNetTrainer'.
Type: str
plans
Plans identifier for model architecture. The default is 'nnUNetPlans'.
Type: str
checkpoint
Model checkpoint file to use for inference. The default is the 'checkpoint_final.pth'.
Type: str