How to add new format of image(.nii) to datasets.ImageFolder?

RuntimeError: Found 0 files in subfolders of: D:/Python/python_stuff/datasets/MRI Normal/dev/train
Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif


It makes more sense in this scenario to write a custom dataloader since nifti is not supported as an extension yet.

Check out PyTorch Custom DataLoader.

I personally use CSV for DataLoading instead.

Can we add any format to at the torchvision/datasets?

Have you checked out pytorch custom dataloader

Go ahead and check this
StackOverflow and forums taught me this.

Not yet. I had a meeting.
I will check and let you know. Thanks a lot.
Also, I have added the nii format to, I got another error. it does not work.