Background label not declared
even though i have labeled the background as 0 in my dataset.json file , i still get the following error
Fingerprint extraction...
Dataset999_BHSD
Traceback (most recent call last):
File "C:\Users\HP\miniconda3\envs\nnunet\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\HP\miniconda3\envs\nnunet\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\HP\miniconda3\envs\nnunet\Scripts\nnUNetv2_plan_and_preprocess.exe_main.py", line 7, in
verify_dataset_integrity(join(nnUNet_raw, dataset_name), num_processes)
abel_handling.py", line 53, in _sanity_check
raise RuntimeError('Background label not declared (remember that this should be label 0!)')
RuntimeError: Background label not declared (remember that this should be label 0!)
this is how i have labeled it
"labels": { "0": "background", "1": "epidural", "2": "intraparenchymal", "3": "intraventricular", "4": "subarachnoid", "5": "subdural" },
Hi @KavyaP-14,
you just need to flip label indices and names and it should work fine, i.e. "labels": { "background": 0, "epidural": 1, "intraparenchymal": 2, "intraventricular": 3, "subarachnoid": 4, "subdural": 5 },
Best, Yannick
Hi @KavyaP-14,
you just need to flip label indices and names and it should work fine, i.e. "labels": { "background": 0, "epidural": 1, "intraparenchymal": 2, "intraventricular": 3, "subarachnoid": 4, "subdural": 5 },
Best, Yannick
it work for me, thx !