不知道如何生成采样位置:
Don't know how to generate sampling locations:
uniform sampler中的维度是如何生成的?我尝试调试图像大小,它似乎适用于某些迭代,但不适用于其他迭代。知道如何解决这个问题。我的配置如下:
[自定义]
num_classes: 14
output_prob: 正确
label_normalisation: 正确
softmax: 真
min_sampling_ratio: 0
compulsory_labels: (0, 1)
rand_samples: 0
min_numb_labels: 1
proba_connect: 正确
evaluation_units: 前景
图片:('images',)
标签:('label',)
权重:()
采样器:()
- 推断:()
姓名:net_segment
[CONFIG_FILE]
- 路径:/home/ubuntu/niftynet/extensions/deepmedic/deepmedic_all_task_renambed_labels.ini
[图像]
csv_file:
path_to_search: /home/ubuntu/med_deacthalon/Task_all_same_names/imagesTr_1
filename_contains: ()
filename_not_contains: ('肺',)
interp_order: 3
装载机:None
pixdim: (1.0, 1.0, 1.0)
axcodes: ('A', 'R', 'S')
spatial_window_size: (51, 51, 51)
[标签]
-csv_file:
path_to_search: /home/ubuntu/med_deacthalon/Task_all_same_names/labelsTr_1
filename_contains: ()
filename_not_contains: ('肺',)
interp_order: 3
装载机:None
pixdim: (1.0, 1.0, 1.0)
axcodes: ('A', 'R', 'S')
spatial_window_size: (9, 9, 9)
[系统]
cuda_devices: ""
num_threads: 2
num_gpus: 1
model_dir: /home/ubuntu/models_nifty/deepmedic/all_task_same_name_rename_labels
dataset_split_file: ./dataset_split.csv
动作:训练
[网络]
姓名:deepmedic
activation_function: relu
batch_size: 32
衰减:0.0
reg_type: L2
volume_padding_size: (21, 21, 21)
volume_padding_mode: 最小值
window_sampling:统一
queue_length: 128
multimod_foreground_type: 和
histogram_ref_file: histogram_standardisation_alltask.txt
norm_type: 百分位数
截止值:(0.01, 0.99)
foreground_type: otsu_plus
归一化:假
美白:真
normalise_foreground_only: 正确
weight_initializer: he_normal
bias_initializer: 零
keep_prob: 1.0
weight_initializer_args: {}
bias_initializer_args: {}
[培训]
优化器:亚当
sample_per_volume: 32
rotation_angle: (-10.0, 10.0)
rotation_angle_x:()
rotation_angle_y: ()
rotation_angle_z:()
scaling_percentage: (-10.0, 10.0)
random_flipping_axes:-1
do_elastic_deformation: 假
num_ctrl_points: 4
deformation_sigma: 15
proportion_to_deform: 0.5
lr: 0.001
loss_type: 骰子
starting_iter: 0
save_every_n: 45
tensorboard_every_n: 20
max_iter: 10
max_checkpoints: 20
validation_every_n:-1
验证_max_iter: 1
exclude_fraction_for_validation: 0.0
exclude_fraction_for_inference: 0.0
[推理]
spatial_window_size: (57, 57, 57)
inference_iter:-1
dataset_to_infer:
save_seg_dir: ./deepmedic/alltask_newname
output_postfix: _niftynet_out
output_interp_order: 0
边框:(36, 36, 36)
CRITICAL:niftynet: Don't know how to generate sampling locations: Spatial dimensions of the grouped input sources are not consistent. {(477, 451, 187), (391, 369, 147)}
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/python3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/ubuntu/anaconda3/envs/python3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/ubuntu/niftynet/NiftyNet/niftynet/engine/image_window_buffer.py", line 148, in _push
for output_dict in self():
File "/home/ubuntu/niftynet/NiftyNet/niftynet/engine/sampler_uniform.py", line 81, in layer_op
self.window.n_samples)
File "/home/ubuntu/niftynet/NiftyNet/niftynet/engine/sampler_uniform.py", line 151, in _spatial_coordinates_generator
_infer_spatial_size(img_sizes, win_sizes)
File "/home/ubuntu/niftynet/NiftyNet/niftynet/engine/sampler_uniform.py", line 238, in _infer_spatial_size
raise NotImplementedError
NotImplementedError
问题已在此处解决:https://github.com/NifTK/NiftyNet/issues/170
总而言之,当在配置文件中设置 pixdim
时,图像和标签应在其 header 中存储相同的体素间距值。
uniform sampler中的维度是如何生成的?我尝试调试图像大小,它似乎适用于某些迭代,但不适用于其他迭代。知道如何解决这个问题。我的配置如下:
[自定义]
num_classes: 14
output_prob: 正确
label_normalisation: 正确
softmax: 真
min_sampling_ratio: 0
compulsory_labels: (0, 1)
rand_samples: 0
min_numb_labels: 1
proba_connect: 正确
evaluation_units: 前景
图片:('images',)
标签:('label',)
权重:()
采样器:()
- 推断:()
姓名:net_segment
[CONFIG_FILE]
- 路径:/home/ubuntu/niftynet/extensions/deepmedic/deepmedic_all_task_renambed_labels.ini
[图像]
csv_file:
path_to_search: /home/ubuntu/med_deacthalon/Task_all_same_names/imagesTr_1
filename_contains: ()
filename_not_contains: ('肺',)
interp_order: 3
装载机:None
pixdim: (1.0, 1.0, 1.0)
axcodes: ('A', 'R', 'S')
spatial_window_size: (51, 51, 51)
[标签]
-csv_file:
path_to_search: /home/ubuntu/med_deacthalon/Task_all_same_names/labelsTr_1
filename_contains: ()
filename_not_contains: ('肺',)
interp_order: 3
装载机:None
pixdim: (1.0, 1.0, 1.0)
axcodes: ('A', 'R', 'S')
spatial_window_size: (9, 9, 9)
[系统]
cuda_devices: ""
num_threads: 2
num_gpus: 1
model_dir: /home/ubuntu/models_nifty/deepmedic/all_task_same_name_rename_labels
dataset_split_file: ./dataset_split.csv
动作:训练
[网络]
姓名:deepmedic
activation_function: relu
batch_size: 32
衰减:0.0
reg_type: L2
volume_padding_size: (21, 21, 21)
volume_padding_mode: 最小值
window_sampling:统一
queue_length: 128
multimod_foreground_type: 和
histogram_ref_file: histogram_standardisation_alltask.txt
norm_type: 百分位数
截止值:(0.01, 0.99)
foreground_type: otsu_plus
归一化:假
美白:真
normalise_foreground_only: 正确
weight_initializer: he_normal
bias_initializer: 零
keep_prob: 1.0
weight_initializer_args: {}
bias_initializer_args: {}
[培训]
优化器:亚当
sample_per_volume: 32
rotation_angle: (-10.0, 10.0)
rotation_angle_x:()
rotation_angle_y: ()
rotation_angle_z:()
scaling_percentage: (-10.0, 10.0)
random_flipping_axes:-1
do_elastic_deformation: 假
num_ctrl_points: 4
deformation_sigma: 15
proportion_to_deform: 0.5
lr: 0.001
loss_type: 骰子
starting_iter: 0
save_every_n: 45
tensorboard_every_n: 20
max_iter: 10
max_checkpoints: 20
validation_every_n:-1
验证_max_iter: 1
exclude_fraction_for_validation: 0.0
exclude_fraction_for_inference: 0.0
[推理]
spatial_window_size: (57, 57, 57)
inference_iter:-1
dataset_to_infer:
save_seg_dir: ./deepmedic/alltask_newname
output_postfix: _niftynet_out
output_interp_order: 0
边框:(36, 36, 36)
CRITICAL:niftynet: Don't know how to generate sampling locations: Spatial dimensions of the grouped input sources are not consistent. {(477, 451, 187), (391, 369, 147)}
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/python3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/ubuntu/anaconda3/envs/python3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/ubuntu/niftynet/NiftyNet/niftynet/engine/image_window_buffer.py", line 148, in _push
for output_dict in self():
File "/home/ubuntu/niftynet/NiftyNet/niftynet/engine/sampler_uniform.py", line 81, in layer_op
self.window.n_samples)
File "/home/ubuntu/niftynet/NiftyNet/niftynet/engine/sampler_uniform.py", line 151, in _spatial_coordinates_generator
_infer_spatial_size(img_sizes, win_sizes)
File "/home/ubuntu/niftynet/NiftyNet/niftynet/engine/sampler_uniform.py", line 238, in _infer_spatial_size
raise NotImplementedError
NotImplementedError
问题已在此处解决:https://github.com/NifTK/NiftyNet/issues/170
总而言之,当在配置文件中设置 pixdim
时,图像和标签应在其 header 中存储相同的体素间距值。