You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
ThreadDataLoader with multiple thread worker ruins RandCropByPosNegLabeld RandCropByPosNegLabeld should produce same sized data pathces but its output has diffrent sized images as below error message.
I checked my input image and label data, all of them larger than crop size(160, 160, 160)
[2024-09-11 23:33:50,010][dev_collate][CRITICAL] - >>> collate dict key "image" out of 2 keys
[2024-09-11 23:33:50,071][dev_collate][CRITICAL] - >>>> collate/stack a list of tensors
[2024-09-11 23:33:50,071][dev_collate][CRITICAL] - >>>> E: stack expects each tensor to be equal size, but got [1, 160, 160, 160] at entry 0 and [1, 160, 160, 110] at entry 2, shape [torch.Size([1, 160, 160, 160]), torch.Size([1, 160, 160, 160]), torch.Size([1, 160, 160, 110]), torch.Size([1, 160, 160, 160])] in collate([metatensor([[[[0.0112, 0.0116, 0.0093, ..., 0.0084, 0.0121, 0.0074],
To Reproduce
Use ThreadDataloader with multiple thread worker
Use RandCropByPosNegLabeld transform
Load Transformed data with ThreadDataloader
Boom!
Describe the bug
A clear and concise description of what the bug is.
ThreadDataLoader
with multiple thread worker ruinsRandCropByPosNegLabeld
RandCropByPosNegLabeld
should produce same sized data pathces but its output has diffrent sized images as below error message.I checked my input image and label data, all of them larger than crop size(160, 160, 160)
[2024-09-11 23:33:50,010][dev_collate][CRITICAL] - >>> collate dict key "image" out of 2 keys
[2024-09-11 23:33:50,071][dev_collate][CRITICAL] - >>>> collate/stack a list of tensors
[2024-09-11 23:33:50,071][dev_collate][CRITICAL] - >>>> E: stack expects each tensor to be equal size, but got [1, 160, 160, 160] at entry 0 and [1, 160, 160, 110] at entry 2, shape [torch.Size([1, 160, 160, 160]), torch.Size([1, 160, 160, 160]), torch.Size([1, 160, 160, 110]), torch.Size([1, 160, 160, 160])] in collate([metatensor([[[[0.0112, 0.0116, 0.0093, ..., 0.0084, 0.0121, 0.0074],
To Reproduce
Use ThreadDataloader with multiple thread worker
Use RandCropByPosNegLabeld transform
Load Transformed data with ThreadDataloader
Boom!
I set
num_random_crops =4
image_size =160,160,160
Expected behavior
A clear and concise description of what you expected to happen.
The
RandCropByPosNegLabeld
should produce cropped images of the same size regardless of the data loader type.Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Ensuring you use the relevant python executable, please paste the output of:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: