不知道如何生成采样位置:

Don't know how to generate sampling locations:

uniform sampler中的维度是如何生成的?我尝试调试图像大小,它似乎适用于某些迭代,但不适用于其他迭代。知道如何解决这个问题。我的配置如下:

[自定义]

姓名:net_segment

[CONFIG_FILE]

[图像]

[标签]

-csv_file:

[系统]

[网络]

[培训]

[推理]

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 中存储相同的体素间距值。