Fully automatic reconstruction of prostate high-dose-rate brachytherapy interstitial needles using two-phase deep learning-based segmentation and object tracking algorithms

Clin Transl Radiat Oncol 2025 Deep Learning 7 Explanations View Original
Original Paper (PDF)

Unable to display PDF. Download it here or view on PMC.

Plain-English Explanations
Pages 1-2
HDR Brachytherapy and the Challenge of Needle Reconstruction

High-dose-rate (HDR) prostate brachytherapy is a form of internal radiation therapy where a radioactive source -- typically iridium-192 or cobalt-60 -- is temporarily guided through a set of hollow needles inserted into the prostate to deliver a concentrated, high dose of radiation directly to cancer cells. It is used for intermediate and high-risk prostate cancer, either as a standalone treatment or combined with external beam radiation.

During a typical HDR procedure, 15 to 20 plastic interstitial needles are inserted through the perineum into the prostate under ultrasound guidance. After insertion, a CT scan is taken so that a medical physicist can digitize the exact path of each needle before calculating a radiation treatment plan. This needle digitization -- called applicator reconstruction -- is the process of mapping each needle's trajectory through the CT image stack.

Manual needle reconstruction is time-consuming (10 to 20 minutes per patient), subjective, and prone to inter-observer variability. Errors in needle position translate directly into dosimetric errors because radiation dose falls off steeply with distance. Accurate needle positions are therefore critical to ensuring the tumor receives the prescribed dose while sparing the rectum, urethra, and bladder.

Prior automated approaches used electromagnetic sensor systems, which require specialized hardware attached to each needle -- a mechanical complexity that limits adoption. A fully software-based deep learning solution that works directly on standard CT images would be more practical and more widely deployable in clinical settings.

TL;DR: HDR prostate brachytherapy requires precise localization of 15-20 needles from CT images, but current manual reconstruction is slow, subjective, and error-prone.
Pages 2-3
Two-Phase Pipeline: Segmentation then Trajectory Tracking

The proposed method divides the needle reconstruction problem into two sequential phases. The first phase uses a Pix2Pix Generative Adversarial Network (GAN) to segment needle cross-sections in each 2D axial CT slice. The second phase uses the GOTURN (Generic Object Tracking Using Regression Networks) deep tracker to link the per-slice detections into complete 3D needle trajectories.

Data were collected from 25 prostate cancer patients treated with CT-guided HDR brachytherapy using a cobalt-60 source at a hospital in Tehran, Iran. CT images had 2mm slice thickness and 0.84mm pixel spacing. After filtering uninformative slices, 17 patients (2,041 slices) were used for training, 3 patients (391 slices) for validation, and 5 patients (592 slices) for testing. The total number of needle locations across test slices was 8,764.

To compensate for the limited dataset size, extensive data augmentation was applied: random rotations at multiple angles around both axes, vertical and horizontal flips, and random spatial translations, resulting in 44,902 augmented training slices -- a 22-fold expansion. Images were also preprocessed by cropping from 512 x 512 to 256 x 256 pixels, focusing the model on the central pelvic region where needles are concentrated.

TL;DR: A two-phase pipeline uses a GAN to segment needles slice-by-slice, then a tracker to reconstruct complete 3D trajectories, trained on 25 patients with 22-fold data augmentation.
Pages 3-4
Pix2Pix GAN Architecture for Needle Segmentation

The segmentation network is a Pix2Pix conditional GAN (cGAN), which frames segmentation as an image-to-image translation problem: the Generator learns to convert a CT slice into its corresponding binary needle mask, while the Discriminator learns to distinguish model-generated masks from true expert-labeled masks. This adversarial training encourages sharper, more realistic segmentation outputs than conventional U-Net training alone.

The Generator is built on a modified U-Net (mU-Net) with encoder-decoder structure and skip connections. Key modifications include replacing pooling layers with strided convolutions to preserve spatial information, introducing Instance Normalization for stable training with small batch sizes, and using LeakyReLU in the encoder to prevent the dying ReLU problem while retaining standard ReLU in the decoder. The loss function combines adversarial loss with L1 distance, ensuring generated masks are both realistic and close to ground truth.

The Discriminator uses a PatchGAN architecture that evaluates image quality in localized 70 x 70 pixel blocks rather than judging the whole image at once. This focus on local patches is well suited for detecting fine structures like thin needle cross-sections and improves the resolution of generated segmentation masks. The adversarial competition reduced total Generator and Discriminator loss from 0.31 to 0.11 and 0.23 to 0.14, respectively, during training.

Training ran for 300 epochs using the Adam optimizer with an initial learning rate of 0.001. Early stopping was applied to prevent overfitting, halting training if validation loss did not improve by at least 0.001 over ten consecutive epochs. A plateau-based learning rate scheduler further adjusted the rate dynamically to improve convergence.

TL;DR: The Pix2Pix GAN uses a modified U-Net generator and PatchGAN discriminator for slice-by-slice needle segmentation, combining adversarial and L1 loss for accurate, fine-detail output.
Pages 4-5
GOTURN Tracker for 3D Needle Trajectory Reconstruction

After each CT slice is segmented, individual needle centers are identified. The reconstruction challenge is then to link needle appearances across the 20 to 40 image slices of a patient scan into coherent 3D trajectories -- while correctly separating needles that cross or run close together. This is addressed by the GOTURN tracker, a feed-forward deep learning tracker that does not require per-patient retraining.

GOTURN works by comparing two successive frames: given the known position of a needle in one slice, it predicts the needle's position in the next slice based on its learned model of how objects move and look. Its architecture consists of two parallel convolutional subnetworks (based on the first five layers of CaffeNet) that extract features from the current and previous frames, which are then combined and processed through three fully connected layers of 4,096 neurons each, with a final four-neuron output representing the bounding box coordinates of the target object.

A key practical advantage of GOTURN is speed: because it is a feed-forward regression network that does not need online training per video frame, it operates rapidly. The search region for each needle is constrained to twice the bounding box size around its previous position, leveraging the physical fact that needles move smoothly through tissue and cannot jump discontinuously between slices.

TL;DR: GOTURN links per-slice needle detections into 3D trajectories by predicting each needle's position in the next slice based on its motion pattern, without requiring per-patient retraining.
Pages 5-7
Segmentation and Tracking Performance

On the 5-patient test set, the Pix2Pix GAN achieved a Dice Similarity Coefficient (DSC) of 0.95 and an Intersection over Union (IoU) of 0.90, with an F1-score of 0.95, recall of 0.93, and precision of 0.97. Among 8,764 total needle locations across all test slices, only 112 (1.28%) were missed. The high precision relative to recall means the model produces fewer false positives than false negatives.

For trajectory reconstruction, the GOTURN tracker achieved a shaft localization error of 0.41 mm and a tip error of 0.68 mm -- both well within the 3mm clinical accuracy requirement for HDR brachytherapy. The tracker successfully followed individual needle paths even in dense areas where multiple needles were closely spaced, without confusing or losing track of individual needles.

Compared to two prior publications for similar HDR brachytherapy applicator segmentation tasks, the proposed model improved DSC from 0.89 and 0.93 to 0.94, and reduced shaft error from 0.50mm to 0.41mm and tip error from 0.80mm and 0.63mm to 0.68mm. These improvements were achieved with a smaller training dataset than the comparison methods, demonstrating the efficiency of the GAN-based approach combined with aggressive data augmentation.

The complete pipeline -- preprocessing, segmentation, and tracking -- runs in just 16.16 seconds on an Nvidia K80/T4 GPU, compared to 10 to 20 minutes for manual digitization. This represents approximately a 40 to 70-fold speed improvement, enabling near-real-time needle reconstruction within the existing clinical workflow.

TL;DR: The system achieved DSC 0.95, shaft error 0.41mm, and tip error 0.68mm while processing all needles in 16 seconds -- a 40-70x speedup over manual digitization.
Pages 7-9
Why GAN-Based Segmentation Outperforms Standard U-Net

A key design choice in this study was selecting Pix2Pix GAN over the more commonly used plain U-Net for medical image segmentation. The authors argue that standard U-Net struggles with highly imbalanced pixel classes -- a problem severe in needle segmentation, where needle pixels are tiny relative to background tissue. The GAN framework addresses this by adding the Discriminator's external feedback loop, which drives the Generator to produce outputs that are locally realistic rather than simply minimizing pixel-level loss.

The PatchGAN Discriminator's block-level analysis is particularly suited for detecting thin, small structures like needle cross-sections. Rather than judging whether the entire image looks realistic -- which would be dominated by the background -- it evaluates whether local image patches match expected needle appearance, maintaining sensitivity to fine structural detail that a pixel-averaged loss might ignore.

The authors also note that fiducial markers placed around tumors have CT intensities similar to needles, making simple thresholding-based segmentation methods unreliable. The learned feature representations of the GAN architecture implicitly distinguish needle cross-sections from similarly bright markers through context and spatial patterns learned from training data, a capability that rule-based methods cannot replicate.

Missed detections (1.28% of cases) were predominantly found for needles with unusually low CT intensity in specific slices, which the authors suggest could be partially addressed by standardizing CT acquisition protocols. Because even a small number of missed needles carries dosimetric consequences in a real clinical scenario, the authors recommend that all automatic reconstructions be reviewed by a physicist before treatment planning proceeds.

TL;DR: GAN-based segmentation addresses class imbalance and fine-structure detection better than standard U-Net, though rare missed needles mean human review remains necessary before clinical use.
Page 9
Clinical Impact and Future Directions

This study demonstrates that a fully software-based, two-phase deep learning pipeline can automatically reconstruct prostate HDR brachytherapy needles from CT images with clinically acceptable accuracy and dramatically reduced processing time. The approach requires no additional hardware beyond a standard GPU, making it more practical for clinical deployment than electromagnetic tracking systems.

The speed improvement -- from 10 to 20 minutes manual digitization to 16 seconds automated processing -- has potential implications beyond just efficiency. Faster reconstruction could enable adaptive treatment planning within the same operating room session, allowing dosimetric evaluation and plan adjustment before the patient is moved, analogous to the workflow vision described for ultrasound-guided systems.

Key limitations include the small single-institution dataset of 25 patients and the use of a single annotator for ground truth labeling. The model has not been benchmarked against widely used baselines like nnUNet. Future work should prioritize multi-institutional validation with larger datasets, benchmarking against standard architectures, and exploring whether the approach generalizes to other brachytherapy sites such as cervical or breast cancer.

TL;DR: A fully automated CT-based needle reconstruction system achieves clinical-grade accuracy in 16 seconds, but requires larger multi-institution datasets and formal benchmarking before deployment.
Citation: Open Access, . Available at: PMC11788795.