Model summary
A 3D MONAI U‑Net for automatic segmentation of renal tumors in contrast‑enhanced CT volumes from the CPTAC‑CCRCC collection hosted by The Cancer Imaging Archive.
Model architecture
- MONAI 3D U‑Net with spatial_dims=3, in_channels=1, out_channels=2, channels=(16, 32, 64, 128), strides=(2, 2, 2), num_res_units=1, dropout=0.3.
- Output: two‑channel softmax (background, tumor) with argmax decoding to a binary label map.
- Loss/metrics: DiceCE loss for training; validation Dice (exclude background) and 95th‑percentile Hausdorff distance (HD95) for evaluation.
Data
- Clinical Proteomic Tumor Analysis Consortium Clear Cell Renal Cell Carcinoma (CPTAC‑CCRCC) radiology images on TCIA.
Preprocessing
- Resampling: images to target spacing 1.5 millimeters × 1.5 millimeters × 2.5 millimeters (linear for images, nearest‑neighbor for labels) followed by center crop/pad to 256×256×128.
- Intensity: clipping to the 1st–99th percentiles and min–max normalization per volume.
Augmentation
- Spatial: RandFlip (all axes), RandRotate90, Rand3DElastic, and RandAffine for anatomical variability.
- Intensity: RandGaussianNoise/Smooth, RandScaleIntensity, RandShiftIntensity, and RandAdjustContrast; MixUp applied stochastically to promote smoother decision boundaries.
Training configuration
- Optimizer/schedule: AdamW, learning rate 5×10^-5, weight_decay 1×10^-4, CosineAnnealingLR; mixed precision (torch.cuda.amp).
- Supervision: DiceCE with softmax and squared predictions; validation every 2 epochs with include_background=False for Dice.
- Split: patient‑wise split (random_state=42) with 41 training and 14 validation subjects after filtering tiny masks.
Evaluation and metrics
- Best validation Dice: 0.499 at epoch 2 (current run).
- Final training loss: 0.722 with training Dice ending at 0.719 (oscillating 0.68–0.80 across epochs).
- Evaluation HD95: 0.0 mm reported under the present validation filtering/aggregation; interpret with caution and verify per‑case statistics.
Results
| Split | Dice | HD95 (mm) |
|---|---|---|
| Validation (best epoch) | 0.499 | 0.0 |
| Train (final epoch) | 0.719 | — |
- Learning dynamics: train loss decreased from 1.410 to 0.722; validation Dice plateau suggests distributional gap and/or filtering impact on small lesions.
Model Outputs and Visualizations
Training Performance Curves
The model's training dynamics are captured in the following metrics over 500 epochs:
Training Loss and Dice Score Evolution: Left panel shows the training loss convergence over epochs using DiceCE loss with squared predictions. Right panel displays both training (green) and validation (orange) Dice coefficients, with validation evaluated every 2 epochs. The model achieved optimal performance at the best epoch checkpoint.
Multi-Planar Segmentation Results
The following samples demonstrate the model's 3D segmentation performance across anatomical planes:
Sample 0 - Multi-Planar View
3D Kidney Tumor Segmentation - Sample 0: Cross-sectional views at central slice positions for each anatomical axis.
Sample 1 - Multi-Planar View
3D Kidney Tumor Segmentation - Sample 1: Three orthogonal views (axial, coronal, sagittal) showing the original CT image (left column), ground truth annotations (middle column), and model predictions in green (right column).
Sample 2 - Multi-Planar View
3D Kidney Tumor Segmentation - Sample 2: Multi-planar visualization demonstrating the model's ability to capture complex tumor morphology. Ground truth masks (red overlay) and predictions (green overlay) show high spatial agreement across axial, coronal, and sagittal slices.
Sample 3 - Multi-Planar View
3D Kidney Tumor Segmentation - Sample 3: Three-plane visualization demonstrating robust segmentation across anatomical orientations.
Sample 4 - Multi-Planar View
3D Kidney Tumor Segmentation - Sample 4: Final validation sample showing the model's performance on validation data. Red overlays indicate expert-annotated regions while green overlays show the model's automated predictions after post-processing with binary fill holes and morphological opening.
How to use
- Preprocess CT to spacing 1.5,1.5,2.5 mm, normalize, and center crop/pad to 256×256×128 to satisfy the model’s input contract.
- Load model.pth and run softmax + argmax to obtain a binary mask; optional post‑processing with hole filling and small‑component removal.
import torch
from monai.networks.nets import UNet
model = UNet(spatial_dims=3, in_channels=1, out_channels=2,
channels=(16,32,64,128), strides=(2,2,2),
num_res_units=1, dropout=0.3).eval().cuda() # architecture contract
state = torch.load("models/best_model.pth", map_location="cuda") # load checkpoint
model.load_state_dict(state) # strict load [attached_file:3]
with torch.no_grad():
logits = model(x) # x: [1,1,256,256,128] after preprocessing
pred = torch.argmax(torch.softmax(logits, dim=1), dim=1) # binary mask
Limitations
- Current validation excludes cases with <500 tumor voxels, which can bias metrics against small lesions and contribute to a flat validation Dice trajectory.
- Generalization to out‑of‑distribution scanners/protocols is unverified; local validation and calibration are required before any clinical use.
License
- Code License: Apache License 2.0
- Dependencies and Their Licenses:
- MONAI: Apache License 2.0
- PyTorch: BSD 3-Clause License
- SimpleITK: Apache License 2.0
- pydicom: MIT-style License
The code and dependencies are provided under permissive open-source licenses, allowing for modification, distribution, and commercial use with proper attribution.
Dataset Citation and Acknowledgments
This model was developed using data from the Clinical Proteomic Tumor Analysis Consortium Clear Cell Renal Cell Carcinoma Collection (CPTAC-CCRCC). Please cite the dataset as follows:
The Clinical Proteomic Tumor Analysis Consortium Clear Cell Renal Cell Carcinoma Collection (CPTAC‑CCRCC), DOI: 10.7937/K9/TCIA.2018.OBLAMN27
Use of this model and any derived works must strictly comply with the Cancer Imaging Archive's (TCIA) Data Usage Policies and Restrictions, including:
- Proper attribution of the dataset as specified above
- Prohibition of any attempts to re-identify individuals from the dataset or derivative works
Adherence to these guidelines ensures ethical and responsible use of sensitive medical data.





