Fastai2 DICOM with Dataloader without CSV

Does anyone have a code snippet for loading DICOM files as input with fastai2 Dataloader? Unable to get it to work.

You may want to check this out: https://dev.fast.ai/medical.imaging. This module mainly focuses on CT images. Let us know if you have another use case which can’t be handled by medical imaging module or data blocks api.

2 Likes

I also have a blog dedicated to medical imaging using Fastai2 that has examples and tips on using DICOMs.

One of the posts specifically goes through notebook_60_medical_imaging.ipynb to help with explanations.

7 Likes

The blog is definitely very helpful!

My aim is to move into training with DICOM as input and I was wondering whether there’s a convenient way to load the DICOMs from a folder structure (train, val, test) without a CSV file specifying the class of each image, but that it is derived from the subdirectory name.