nnUNet_preprocessed一、环境配置
1.安装CUDA 工具包 12.8 Update 1 下载 |NVIDIA 开发人员
选择合适自己的cuda版本下载,不超过电脑配置即可
我下载的是12.3版本
然后按照相应博客教程一步步安装CUDA安装教程(超详细)-CSDN博客
2.安装pytorch
从本地开始 |PyTorch 插件
进入网站选择与cuda版本对应的cuda安装,我安装的是2.0.0,cuda 11.8版本
3.配置文件
pip install -e .
出现的问题:
1.blosc包安装不上
INFO: pip is looking at multiple versions of nnunetv2 to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following yanked versions: 2.3.0, 2.5.0
ERROR: Could not find a version that satisfies the requirement blosc2>=3.0.0b1 (from nnunetv2) (from versions: 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10
, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.4.1, 0.5.1, 0.5.2, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 2.0.0, 2.1.0, 2.1.1, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.3.1, 2.3.2, 2.4.0, 2.5.1)
ERROR: No matching distribution found for blosc2>=3.0.0b1
解决方法:单独安装该包,并且在setup.py删除该包的配置
pip install blosc2>=3.0.0b1 --no-binary :all: --only-binary :none:
2.nnunetv2安装不上
Channels:- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge - defaults
Platform: win-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failedPackagesNotFoundError: The following packages are not available from current channels:- nnunetv2Current channels:- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge - defaultsTo search for alternate channels that may provide the conda package you're
looking for, navigate tohttps://anaconda.org and use the search bar at the top of the page.
解决方法:
开一个新环境,切记pip install nnunetv2和
pip install -e .只能选一句运行,不然会出现依赖冲突
4.数据准备
Medical Segmentation Decathlon
前往该网址选择test_heart02下载
目录中新建dataset包,包内新建
nnUNet_raw
nnUNet_preprocessed
nnUNet_results
将刚刚的数据放入nnUNet_raw中
同时改变path.py中的文件路径
以及convert_msd_dataset.py下的文件路径
点击运行,处理相关数据,后dataset文件夹会出现如下所示 的文件
Dataset001