In this blog, we will explore how to effectively use a pre-trained model designed for the volumetric segmentation of the spleen from CT images. This model leverages advanced techniques from the Medical Segmentation Decathlon Challenge and implements the UNet architecture. Let’s dive into the step-by-step instructions for operating this model successfully!
Model Overview
This pre-trained model was trained using a leading pipeline from the 2018 Medical Segmentation Decathlon Challenge, featuring:
- Architecture: UNet
- Training Images: 32
- Validation Images: 9
Data Requirements
To run this model, you’ll need to acquire the training dataset. You can find it in the Task09_Spleen.tar. This data is critical for both training and testing segments of your process.
Training Configuration
Ensure you have a GPU with at least 12GB of memory, as this is necessary for training the model effectively. The dimensions for actual model input are:
- 96 x 96 x 96 (3D volume)
Input and Output Formats
When you feed a CT image to the model, here’s what you can expect:
- Input: 1 channel CT image
- Output: 2 channels with the following labels:
- Label 1: Spleen
- Label 0: Everything else
Scoring
This model boasts an impressive performance, achieving a mean Dice score of:
- Mean Dice = 0.96 on validation data
Executing Inference
To run the model and perform inference, you will need to execute specific commands in your terminal. Here are the examples:
python -m monai.bundle run evaluator --meta_file configs/metadata.json --config_file configs/inference.json --logging_file configs/logging.conf
Verification Commands
To ensure everything is set up correctly, you can verify:
- Metadata format:
python -m monai.bundle verify_metadata --meta_file configs/metadata.json --filepath evalschema.json - Data shape of network:
python -m monai.bundle verify_net_in_out network_def --meta_file configs/metadata.json --config_file configs/inference.json
Exporting the Model
If you want to export your model to a TorchScript file, use the following command:
python -m monai.bundle export network_def --filepath models/model.ts --ckpt_file models/model.pt --meta_file configs/metadata.json --config_file configs/inference.json
Troubleshooting
If you encounter any issues during the process, consider the following troubleshooting ideas:
- Check if all required datasets are correctly downloaded and in the right directories.
- Ensure that the specified paths in your command are accurate and the configuration files are properly set up.
- If you experience performance issues, verify the memory allocation of your GPU and consider reducing the batch size.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
With these detailed instructions and commands, you should be well-equipped to utilize the pre-trained model for your 3D segmentation tasks. Remember that this model is an excellent tool for research and development, but it should not be used for diagnostic purposes.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

