修改nnUNetPlans.json的

参考:https://arxiv.org/html/2309.13747v2

https://github.com/MIC-DKFZ/nnUNet/blob/master/documentation/competitions/AutoPETII.md

https://github.com/MIC-DKFZ/nnUNet/blob/master/documentation/explanation_plans_files.md

1、生成配置文件

nnUNetv2_extract_fingerprint -d 221: extracts the dataset fingerprint
nnUNetv2_plan_experiment -d 221: does the planning for the plain unet
nnUNetv2_plan_experiment -d 221 -pl ResEncUNetPlanner: does the planning for the residual encoder unet
nnUNetv2_preprocess -d 221 -c 3d_fullres: runs all the preprocessing we need

主要的差异就是增加了ResEncUNetPlanner,就是residual encoder。

2、修改网络结构

然后把ResEncUNetPlanner生成的nnUNetResEncUNetPlans.json中的内容,合并到nnUNetPlans.json。

网络结构之间还能够继承,因此进需要增加一个,与3d_fullres重复的内容可以省略

        "3d_fullres_resenc": {
            "inherits_from": "3d_fullres",
            "network_arch_class_name": "ResidualEncoderUNet",
            "n_conv_per_stage_encoder": [
                1,
                3,
                4,
                6,
                6,
                6
            ],
            "n_conv_per_stage_decoder": [
                1,
                1,
                1,
                1,
                1
            ]
        },

3、修改patch size和batch size

        "3d_fullres_resenc_bs80": {
            "inherits_from": "3d_fullres_resenc",
            "batch_size": 80
            },
        "3d_fullres_resenc_192x192x192_b24": {
            "inherits_from": "3d_fullres_resenc",
            "patch_size": [
                192,
                192,
                192
            ],
            "batch_size": 24
        }

4、运行

nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_bs80 0 -num_gpus 8
nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_bs80 1 -num_gpus 8
nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_bs80 2 -num_gpus 8
nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_bs80 3 -num_gpus 8
nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_bs80 4 -num_gpus 8

nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_192x192x192_b24 0 -num_gpus 8
nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_192x192x192_b24 1 -num_gpus 8
nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_192x192x192_b24 2 -num_gpus 8
nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_192x192x192_b24 3 -num_gpus 8
nnUNet_compile=T nnUNet_n_proc_DA=28 nnUNetv2_train 221 3d_fullres_resenc_192x192x192_b24 4 -num_gpus 8

nnUNet_n_proc_DA数据扩增线程数,3d_fullres_resenc_192x192x192_b24调用的plan。


Global settings

  • foreground_intensity_properties_by_modality: 归一化
  • image_reader_writer: 文件读写器
  • label_manager: label的操作
  • transpose_forward: 与spacing有关,对2D U-Net 影响大一些??
  • transpose_backward: 恢复转置
  • [original_median_shape_after_transp]: shape
  • [original_median_spacing_after_transp]: space
  • [plans_name]: 计划名称
  • [experiment_planner_used]: 代码中的planner对应的类
  • [dataset_name]: 数据集名称

Local settings

  • spacing: target spacing
  • patch_size: patch size
  • data_identifier: plane的组合名称
  • batch_size: batch size
  • batch_dice: 是否启用 batch dice,该batch都是来源一个数据(是),来源多个数据(否)
  • preprocessor_name: 预处理类
  • use_mask_for_norm: 一般都是false,BraTS可以选择为true
  • normalization_schemes: 归一化类
  • resampling_fn_data: 重采样的方法名
  • resampling_fn_data_kwargs: 参数
  • resampling_fn_probabilities: 重采样的方法名
  • resampling_fn_probabilities_kwargs: 参数
  • resampling_fn_seg: 重采样的方法名
  • resampling_fn_seg_kwargs: 参数
  • network_class_name: 对应网络类
  • UNet_base_num_features: 直接在features_per_stage中体现
  • unet_max_num_features: 320 for 3D and 512 for 2d)
  • conv_kernel_sizes:  convolutional kernel sizes 
  • n_conv_per_stage_encoder: number of convolutions used per stage
  • n_conv_per_stage_decoder: number of convolutions used per stage in the decoder. 
  • num_pool_per_axis strides:pool
  • pool_op_kernel_sizes kernel_sizes: kernel sizes
  • [median_image_size_in_voxels]: the median size of the images
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值