Project-MONAI / model-zoo

MONAI Model Zoo that hosts models in the MONAI Bundle format.
Apache License 2.0
174 stars 65 forks source link

wholeBody_ct_segmentation model for DICOM input file #508

Closed ytl0623 closed 2 months ago

ytl0623 commented 10 months ago

Hi, I was used wholeBody_ct_segmentation model to test custom clinical image.

But the format file is NIFITI (.nii), how can I inference the model with DICOM file format.

Is there any method to prove it.

Thanks in advance.

diazandr3s commented 10 months ago

Hi @ytl0623,

This is a good question. I guess there are two options here:

Hope this helps,

ArthurRomansini commented 8 months ago

If you're using the model via a python script you can just pass the dicom directory to the preprocess like that:

CTDicomFolder = "./data/yourdicomfolder"
configPath = "./models/yourmodelhere/configs/inference.json"

config = ConfigParser()
config.read_config(configPath)
preprocessing = config.get_parsed_content("preprocessing")
data = preprocessing({'image': CTDicomFolder})