You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good morning, I am currently trying to create a detailed and well annotated script for training using nn-U-NETv2. The script is going include visualization of key metrics during training and give me key visual graphs/charts for model evaluation afterwards.
My goal is to train the model using labels already created from manually segmenting MRIs in the MONAI Label module of 3DSlicer.
Right now, I am running the script in Google Colab via Local Host.
Everything in the script runs as expected until this current block of code:
"# Modified preprocessing script with basic arguments
import os
import subprocess
NNU_Net_12_12_24 (2).md
Good morning, I am currently trying to create a detailed and well annotated script for training using nn-U-NETv2. The script is going include visualization of key metrics during training and give me key visual graphs/charts for model evaluation afterwards.
My goal is to train the model using labels already created from manually segmenting MRIs in the MONAI Label module of 3DSlicer.
Right now, I am running the script in Google Colab via Local Host.
Everything in the script runs as expected until this current block of code:
"# Modified preprocessing script with basic arguments
import os
import subprocess
cmd = "nnUNetv2_plan_and_preprocess -d 100 --verify_dataset_integrity --npfp 8"
try:
Run preprocessing with full output capture
result = subprocess.run(
cmd,
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
)
print("Command Output:")
print(result.stdout)
print("\nError Output (if any):")
print(result.stderr)
Print exit code
print("\nExit code:", result.returncode)
Check if preprocessing succeeded
preprocessed_path = os.path.join(os.environ.get('nnUNet_preprocessed'), 'Dataset100_CSFSegmentation')
if os.path.exists(preprocessed_path):
print(f"\nPreprocessing completed successfully")
print("Contents:", os.listdir(preprocessed_path))
else:
print("\nPreprocessing directory not created")
except Exception as e:
print(f"Error running preprocessing: {e}")"
Resulting Output:
"Command Output:
Error Output (if any):
usage: nnUNetv2_plan_and_preprocess [-h] [-d D [D ...]] [-fpe FPE]
[-npfp NPFP] [--verify_dataset_integrity]
[--no_pp] [--clean] [-pl PL]
[-gpu_memory_target GPU_MEMORY_TARGET]
[-preprocessor_name PREPROCESSOR_NAME]
[-overwrite_target_spacing OVERWRITE_TARGET_SPACING [OVERWRITE_TARGET_SPACING ...]]
[-overwrite_plans_name OVERWRITE_PLANS_NAME]
[-c C [C ...]] [-np NP [NP ...]]
[--verbose]
nnUNetv2_plan_and_preprocess: error: unrecognized arguments: --npfp 8
Exit code: 2
Preprocessing directory not created"
I have attempted several troubleshooting fixes (in both the code itself & bash/Anaconda Powershell Prompt), such as:
RESULT: : AssertionError: Did not find the expected number of training cases (90). Found 1 instead.
Examples: ['CS']
RESULT: AssertionError: Did not find the expected number of training cases (90). Found 1 instead.
Examples: ['CS']
RESULT: nnUNetv2_plan_and_preprocess: error: unrecognized arguments: --np 8
What further troubleshooting steps could I take to establish the preprocessing directory?
The text was updated successfully, but these errors were encountered: