Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

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

Open
shenlinyao opened this issue Mar 5, 2018 · 1 comment

Comments

@shenlinyao
Copy link

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不匹配?

@lironghua318
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants