I’m interested in using the fastai library to learn a regression function from the intensities of one MR image to another MR or CT image (example paper: Deep MR to CT Synthesis using Unpaired Data). That is, I want to load in a 3D volume, pass it through a neural network, where the target is another 3D volume of the same dimension/shape, minimizing some loss like L2-norm.
I can do this in tf, pytorch, keras, but this library has some additional functionality and testing/visualization capabilities which seem great. However, I am having trouble figuring out how to setup a dataset loader that is appropriate for the files I would like to load, specifically, NIfTI (.nii) files. I believe I just need to setup a custom dataset loader which would use nibabel to open the NIfTI files. Can someone point me to the right function/class to modify? I see the
ImageDataset class and an example of how to modify it, but I’m not sure if this class is appropriate for my task.
Also, are 3D volumes compatible with the library? Or would I just have to extract 2D patches from the 3D volumes and fit to those?
Thank you for the help.