Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bug when test #6

Open
mitiandi opened this issue Oct 30, 2018 · 0 comments
Open

A bug when test #6

mitiandi opened this issue Oct 30, 2018 · 0 comments

Comments

@mitiandi
Copy link

I found a bug in 'val.py', which caused abnormal segmentation result ( a poor dice) in some case (eg. volume-54.nii). The number of its slices was divisible by 48 (the 3d patch's depth size),when it was split into test dataset, the value of variable 'count' will be equal 0,but such code
{ pred_seg = np.concatenate([pred_seg, outputs_list[-1][-count:]], axis=0) }
will concentrate the last block (entire 3d 256×256×48 patches) on the segmentation result,which should been only used the last several slices (the number of slices which should be used = count)
--------------------original code -----------------------------

当无法整除的时候反向取最后一个block

if end_slice is not ct_array.shape[0] - 1:
    flag = True
    count = ct_array.shape[0] - start_slice
    ct_array_list.append(ct_array[-size:, :, :]

--------------------revised code--------------------------------
# 当无法整除的时候反向取最后一个block
if end_slice is not ct_array.shape[0] - 1:
count = ct_array.shape[0] - start_slice
if count != 0:
flag = True
ct_array_list.append(ct_array[-size:, :, :])

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

No branches or pull requests

1 participant