参考: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 spacingpatch_size
: patch sizedata_identifier
: plane的组合名称batch_size
: batch sizebatch_dice
: 是否启用 batch dice,该batch都是来源一个数据(是),来源多个数据(否)preprocessor_name
: 预处理类use_mask_for_norm
: 一般都是false,BraTS可以选择为truenormalization_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)
: convolutional kernel sizesconv_kernel_sizesn_conv_per_stage
: number of convolutions used per stage_encodern_conv_per_stage_decoder
: number of convolutions used per stage in the decoder.num_pool_per_axis
strides
:poolpool_op_kernel_sizes
kernel_sizes
: kernel sizes- [
median_image_size_in_voxels
]: the median size of the images