I am trying to do a preprocessing of nnUNetv2 in my desktop.
It was not worked in Visual Studio, so I changed my environment to Anaconda prompt.
However, it has still the same issue with 'cannot pickle 'module' object'.
Anyone knows how to fix this issue?
Thank you very much.
(nnunetv2) C:\Users\username\Research\nnUNet_raw>nnUNetv2_extract_fingerprint -d 1 --verbose Dataset001_AirwaySegmentation Using <module 'nibabel' from 'C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\site-packages\nibabel\init.py'> reader/writer Traceback (most recent call last): File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\Scripts\nnUNetv2_extract_fingerprint.exe_main.py", line 7, in File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\site-packages\nnunetv2\experiment_planning\plan_and_preprocess_entrypoints.py", line 27, in extract_fingerprint_entry extract_fingerprints(args.d, args.fpe, args.np, args.verify_dataset_integrity, args.clean, args.verbose) File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\site-packages\nnunetv2\experiment_planning\plan_and_preprocess_api.py", line 46, in extract_fingerprints extract_fingerprint_dataset(d, fingerprint_extractor_class, num_processes, check_dataset_integrity, clean, File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\site-packages\nnunetv2\experiment_planning\plan_and_preprocess_api.py", line 32, in extract_fingerprint_dataset return fpe.run(overwrite_existing=clean) File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\site-packages\nnunetv2\experiment_planning\dataset_fingerprint\fingerprint_extractor.py", line 130, in run results = ptqdm(DatasetFingerprintExtractor.analyze_case, File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\site-packages\acvl_utils\miscellaneous\ptqdm.py", line 34, in ptqdm for i, result in p.imap_unordered(function_wrapper, enumerate(iterable), chunksize=chunksize): File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\multiprocessing\pool.py", line 868, in next raise value File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\multiprocessing\pool.py", line 537, in _handle_tasks put(task) File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\multiprocessing\connection.py", line 206, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "C:\Users\username\AppData\Local\anaconda3\envs\nnunetv2\lib\multiprocessing\reduction.py", line 51, in dumps cls(buf, protocol).dump(obj) TypeError: cannot pickle 'module' object
I installed Python==3.8 here, and all of required modules are configured,
for example, Pytorch, nibabel, SimpleITK, scikit-image, etc.
Also, I tried to use pathos, but it seems to work in Python, not in Anaconda prompt.