Closed zhaoxiaoqian666 closed 4 years ago
Related to #274
Hi @zhaoxiaoqian666,
It looks like your input images and labels have different size.
Thank you !But I check the image size of input and label,I’m sure they are consistent。------------------ 原始邮件 ------------------ 发件人: "Fernando Perez-Garcia"notifications@github.com 发送时间: 2019年9月30日(星期一) 晚上6:48 收件人: "NifTK/NiftyNet"NiftyNet@noreply.github.com; 抄送: "zhaoxiaoqian666"1476585534@qq.com;"Mention"mention@noreply.github.com; 主题: Re: [NifTK/NiftyNet] CRITICAL:niftynet: Don't know how to generatesampling locations: Spatial dimensions of the grouped input sources are notconsistent. {(512, 512, 102), (512, 512, 92)} 2019-09-27 17:21:51.189240: Wtensorflow/core/framework/op_kernel.cc:1261] Unimplemented:NotImplementedError: (#443)
Hi @zhaoxiaoqian666,
It looks like your input images and labels have different size.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
The images may have the same size, but the blocks you extract from the images are different sizes:
[IMAGE] -- csv_file: /home/deserts/Projects/NiftyNet-dev/config/g1/group1test.csv -- filename_contains: None -- filename_not_contains: () -- filename_removefromid: -- interp_order: 1 -- loader: None -- pixdim: () -- axcodes: () -- spatial_window_size: (96, 96, 96) <------------------------------------------------- Block size of image [LABEL] -- csv_file: /home/deserts/Projects/NiftyNet-dev/config/g1/group1label.csv -- filename_contains: None -- filename_not_contains: () -- filename_removefromid: -- interp_order: 1 -- loader: None -- pixdim: () -- axcodes: () -- spatial_window_size: (80, 80, 80) <-------------------------------------------------- Block size of label
I modified the parameter border of croplayer in unet.py as follows: crop_layer = CropLayer (border = 8, name ='crop-16'), so the size of image is equal to the size of label after removing the border.I don't know if that's true?
I modified the parameter border of croplayer in unet.py as follows: crop_layer = CropLayer (border = 8, name ='crop-16'), so the size of image is equal to the size of label after removing the border.I don't know if that's true?
That's true, alternatively you could try name= nonewnet
which uses an improved version of unet 3d https://github.com/NifTK/NiftyNet/blob/dev/niftynet/network/no_new_net.py#L18
Thank you!I found the mistake,I mistakenly wrote the test file into a training set.
What you were trying to do (and why)
I encountered the problem in training Unet,I saw the previous posts, but my problem has not been solved. Maybe the wrong situation is different. Below are my configuration files and errors:
What happened (include command output)
I hope you can help me point out where the problem is,Thank you!