Tianchi-Medical-LungTumorDetect icon indicating copy to clipboard operation
Tianchi-Medical-LungTumorDetect copied to clipboard

关于unet分割时的generators中的get_block和get_mask不匹配问题疑问

Open shenlinyao opened this issue 6 years ago • 1 comments

mask[coord[0] - radius[0]:coord[0] + radius[0] + 1, coord[1] - radius[1]:coord[1] + radius[1] + 1, coord[2] - radius[2]:coord[2] + radius[2] + 1] = 1.0 这行是根据结节的半径,在mask的正中央,构造了一个立方体结节部分为1 w, h, d = int(coord[0] - shape[0] // 2), int(coord[1] - shape[1] // 2), int(coord[2] - shape[2] // 2) w, h, d = max(w, 0), max(h, 0), max(d, 0) w, h, d = min(w, W - shape[0] - 1), min(h, H - shape[1] - 1), min(d, D - shape[2] - 1) block = hf['img'][w:w + shape[0], h:h + shape[1], d:d + shape[2]] 这几行代码生成的block,如果w, h, d = max(w, 0), max(h, 0), max(d, 0)中取了0值的话,那么生成的block中的结节不在正中央,会不会对应的mask不匹配?

shenlinyao avatar Mar 05 '18 13:03 shenlinyao

我也有这个疑问,你怎么处理的呢,我现在训练不收敛,11个epoch就自动停了

lironghua318 avatar Jul 16 '19 11:07 lironghua318