3DRDN-CycleGAN
3DRDN-CycleGAN copied to clipboard
Error in valid_batch = [next(valid_dataset)]
Error:
how to solve this problem,
#Initial Random Slice Image Generation
valid_batch = [next(valid_dataset)]
Traceback (most recent call last):
File "main.py", line 26, in
Hi @juzhongren,
What are the dimensions of the images that you're using as a dataset ?
The parameters PATCH_SIZE and BOUNDARY_VOXELS_1 are set such that the image patch (extracted from the 3d image) thats inserted into the network is of size 40x40x40 and is at least 50 pixels/voxels away from all 6 sides of the image cube as these are almost always empty pixels/voxels surrounding the scanned image.
If your images have a dimension smaller than 140 (50 + 40 + 50) then you need to adjust these 2 parameters (PATCH_SIZE, BOUNDARY_VOXELS_1) accordingly by making them smaller.
Let me know if this answers your question.