Tumor Detection Model

Tumor Detection

I fine-tuned the encoder and decoder of a 3D PET/CT segmentation model for 1,500 epochs. I used the same cached encoder features to compare the original shared classifier with tracer-specific classifiers. Overall balanced accuracy rose from 84.91% to 85.88% on the same 315 validation scans. I also rebuilt the training pipeline from scratch for 1,611 scans and evaluated the rebuilt model on a separate patient-level holdout.

Extracting 640 features per scan

I used LesionTracer’s 3D nnU-Net configuration and initialized it with MultiTalent pretrained weights. I fine-tuned it on paired PET and CT volumes on Rose-Hulman’s GPU cluster. The encoder learned features from both volumes. The decoder used those features to produce a 3D lesion probability map.

For each 3D patch, I averaged the spatial activations within each of the deepest encoder layer’s 320 channels. I then kept the mean and max across patches for each channel, producing 640 features per scan. Caching those features let me train classifiers on a CPU without rerunning the 3D encoder. I verified that all 315 validation feature vectors from the original demo matched the cache.

How I improved the scan classifier

My baseline was a neural classifier with one 16-unit hidden layer. It flagged five of the ten lesion-negative PSMA validation scans. I widened the hidden layer to 128 units and experimented with dropout, learning rate, and decision thresholds. The 128-unit configuration detected three more lesion-positive PSMA scans and produced one more false positive. Its overall balanced accuracy was 84.35%.

I used patient-grouped cross-validation to compare logistic regression, support vector machines, and tree ensembles. I also tested a feature based on the difference between log-transformed max and mean activations. The classifier ranked lesion-positive PSMA scans above lesion-negative scans more often, raising AUROC from 0.740 to 0.793. At the selected threshold it still missed 11 lesion-positive PSMA scans.

I kept the 16-unit neural classifier for FDG and used weighted logistic regression for PSMA. I assigned PSMA training scans with no annotated lesion three times the weight of other scans. At the selected decision thresholds, PSMA false positives fell from five to three, with 98 of 106 lesion-positive PSMA scans detected in both configurations.

315 validation scans used to choose the classifier pairing
SetupBalanced accuracyPSMA false alarmsPSMA misses
Shared network, 16 units84.91%5 of 108 of 106
Shared network, 128 units84.35%6 of 105 of 106
Shared weighted logistic regression84.40%3 of 108 of 106
Tracer-specific classifiers85.88%3 of 108 of 106
See the validation results

Rebuilding the pipeline from scratch

When the dataset download kept timing out on the cluster, I switched to the public Imaging Data Commons release. I matched all 1,611 studies to the existing patient-level split, checked the spatial alignment of the converted PET, CT, and lesion masks, and ran the conversion in 12 Slurm batches. Each batch tracked completed studies so I could retry failures without repeating successful conversions.

The split contains 980 training scans, 315 validation scans, and 316 holdout scans. I computed normalization and planning statistics from the training scans only, then trained a separate nnU-Net from random initialization. I added automatic checkpoint resume so training could continue across Slurm time limits. I recorded the split, preprocessing plans, and checkpoint hashes used in the rebuild.

Testing what the decoder adds

I compared classifiers trained on encoder features alone, decoder features alone, and both together. From each 3D probability map I extracted the maximum lesion probability and the log-transformed volume of the largest connected region at a 0.50 probability threshold.

Adding the decoder features raised validation balanced accuracy from 71.39% to 79.67% when averaged across the two tracers. I fixed the classifier and decision thresholds before evaluating it on 316 holdout scans, where it reached 86.61% overall balanced accuracy across the pooled scans.

Benchmarking and fine-tuning segmentation

I built a tool that compares predicted and reference masks in 3D. It reports Dice overlap and measures the volume of predicted lesions that overlap no reference lesion, along with the volume of reference lesions the model misses entirely. I compared the rebuild with LesionTracer v2 on the same 198 scans from a different hospital. The largest gap in false-positive volume was on FDG scans.

I fine-tuned the lesion decoder with the encoder frozen and verified that the encoder weights stayed unchanged. After 10 epochs, mean FDG false-positive volume fell 23% on validation. The decoder produced false-positive segmentations on 60 of 93 lesion-negative FDG scans, down from 66. Across 212 lesion-positive validation scans, mean Dice fell from 0.653 to 0.643. I kept the original segmentation in the demo because it had the highest mean Dice on those scans at 0.660.

Running predictions in the browser

I precomputed the encoder features and segmentation overlays so the demo can run on a static site. JavaScript evaluates the tracer-specific classifiers on the cached features. I verified that the browser reproduces the recorded counts of true positives, true negatives, false positives, and false negatives across all 315 validation scans. In the prediction dialog, you can replace individual feature values with their training-set means and see how the classifier score changes.

Data sources

The demo displays resized PET and CT slices from the AutoPET III training release alongside model heatmaps and dataset outlines. The underlying collections are FDG-PET-CT-Lesions by Gatidis and Küstner and PSMA-PET-CT-Lesions by Jeblick et al.

AutoPET III · FDG dataset · PSMA dataset · CC BY-NC 4.0

Glossary
PET and CT
PET shows where an injected tracer collects in the body. CT uses X-rays to show structures such as bones and organs. A PET/CT scan combines the two views.
Tracer, FDG, and PSMA
A tracer is the substance PET uses to produce an image. FDG acts like glucose and shows where tissues take it up. PSMA tracers bind to a protein often found at higher levels on prostate cancer cells.
Lesion and dataset reference
A lesion is an area of abnormal tissue. The dataset reference says whether AutoPET includes a tumor annotation anywhere in the scan.
Classifier and decision threshold
The classifier produces one lesion score per scan. If the score meets or exceeds the decision threshold, shown as the cutoff, the demo reports “Lesion present.”
Segmentation and overlay
Segmentation predicts where a tumor may be on the scan. Purple indicates lower predicted tumor likelihood and pale yellow indicates higher likelihood. The cyan outline comes from the AutoPET annotation. Radiologists drew the FDG annotations and reviewed the PSMA annotations.
Balanced accuracy
The average of two rates: how often the model correctly predicts a lesion on scans with an annotation (sensitivity), and how often it correctly predicts no lesion on scans without one (specificity).
False alarm and missed lesion
A false alarm means the model predicted a lesion on a scan without an annotation. A missed lesion means it predicted no lesion on a scan with an annotation.
Dice, recall, and precision
In the segmentation metrics, Dice measures how much the predicted and annotated regions overlap. Recall asks how much of the annotated region the model found. Precision asks how much of the predicted region matches the annotation.