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

Sliding Window Issue Aggregation Issue #63

Open
timat33 opened this issue May 10, 2024 · 2 comments
Open

Sliding Window Issue Aggregation Issue #63

timat33 opened this issue May 10, 2024 · 2 comments

Comments

@timat33
Copy link

timat33 commented May 10, 2024

Hi there,

I'm experiencing an issue with the sliding window aggregation (line 464 of inference.py). I'm working on a dataset that I do not have permission to share, but I could recreate the issue by creating a ground-truth for one of my images, setting a cube at one of the corners to be foreground, and all else background:

fake_gt = np.zeros(gt.shape, dtype=np.uint8)
fake_gt[:10, :10, :10] = 1

Then when trying to aggregate, I get
ori_roi = (0, -62, 0, -62, 0, -56)
pred_roi = (94, 32, 94, 32, 88, 32)

which doesn't permit the insertion of the prediction into the full prediction, ie
seg_mask_roi = seg_mask[..., pred_roi[0]:pred_roi[1], pred_roi[2]:pred_roi[3], pred_roi[4]:pred_roi[5]]
pred3D_full_dict[idx][..., ori_roi[0]:ori_roi[1], ori_roi[2]:ori_roi[3], ori_roi[4]:ori_roi[5]] = seg_mask_roi
gives
could not broadcast input array from shape (0,0,0) into shape (1,1,219,160,509)

Which makes sense, the ori_roi's negative indices are meant to be out of bounds, not normal indices, and the pred_roi has eg pred_roi[1]<pred_roi[0] also suggesting that the indexing has gone wrong. I'd appreciate your advice.

Many thanks,
Tim

@innocence0206
Copy link

I encounter this same promblem, have you solved it?

@timat33
Copy link
Author

timat33 commented Jun 20, 2024

I'm afraid not

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

2 participants