MONAI Medical Imaging AI
Use this skill for deep-learning workflows on medical images. MONAI is most appropriate for 2D/3D segmentation, classification, registration, self-supervised pretraining, transforms, and inference over NIfTI, DICOM-derived, or similar medical imaging tensors.
Routing
- Use
pydicomfor DICOM metadata and low-level DICOM file handling. - Use
pathmlorhistolabfor pathology whole-slide workflows. - Use this skill for PyTorch medical imaging model development and inference.
Workflow
- Define the clinical/image task and label source.
- Audit data splits by patient, site, scanner, and time to avoid leakage.
- Normalize orientation, spacing, intensity scaling, and crop strategy.
- Build MONAI transforms for training and validation separately.
- Use
CacheDatasetor persistent caching when transforms are expensive. - Select architecture:
UNet/DynUNet/SwinUNETRfor segmentation.- DenseNet/ViT-style networks for classification.
- Train with explicit metrics:
- Dice/IoU/Hausdorff for segmentation.
- AUROC/sensitivity/specificity/calibration for classification.
- Run sliding-window inference for large 3D volumes.
Implementation Notes
- Always record voxel spacing, orientation, and resampling choices.
- Keep transforms deterministic in validation/test pipelines.
- For clinical claims, report site split, patient count, label source, failure modes, and uncertainty.
- Save model weights, config, transform pipeline, and package versions together.