Life Science - SwinUNETR Inference#
This Helm Chart deploys a SwinUNETR model as an Inference Service, for multiorgan segmentation of 3D CT scans.
SwinUNETR model#
SwinUNETR is a deep learning architecture designed for medical image segmentation, particularly in 3D volumetric data such as CT or MRI scans with the aim to detect tumors in the images. It combines the strengths of two powerful models: 1. Swin Transformer - a hierarchical vision transformer that captures long-range dependencies and contextual information efficiently and 2. UNETR (UNet with Transformers) - a transformer-based encoder-decoder architecture tailored for medical image segmentation.
Model weights are loaded from HuggingFace.
Check out the demo_inference_service.ipynb example to see how it works.
Data#
The training data are 3D CT scans from the BTCV challenge dataset. The target segmentation includes 13 abdominal organs:
Spleen
Right Kidney
Left Kideny
Gallbladder
Esophagus
Liver
Stomach
Aorta
IVC
Portal and Splenic Veins
Pancreas
Right adrenal gland
Left adrenal gland
Prerequisites#
Ensure the following prerequisites are met before deploying any workloads:
Helm: Install
helm. Refer to the Helm documentation for instructions.
Deploying the Workload#
It is recommended to use helm template and pipe the result to kubectl create , rather than using helm install. Generally, a command looks as follows
helm template [your-release-name] ./helm | kubectl apply -f -
The chart provides three main ways to deploy models, detailed below.
User Input Values#
Refer to the values.yaml file for the user input values you can provide, along with instructions.
Interacting with Deployed Model#
Verify Deployment#
Check the deployment status:
kubectl get deployment
Send prediction request#
Follow the demo_inference_service.ipynb notebook to see how to use the inference service.