Training Landmark-Based Shape Decoders Without Landmarks

Some medical segmentation models output a shape instead of a pixel map. They predict the coordinates of a fixed set of points connected into outlines, so the result can never contain holes or stray islands. These models stay reliable when parts of the image are hidden. The cost is supervision: to train them, a person must place every point by hand on every training image, 166 per chest X-ray in one well-known case. We propose to remove that cost. The same point-predicting decoder is trained only from ordinary masks, through a differentiable rasterizer (a soft renderer that turns predicted outlines into a pixel mask). The loss combines three kinds of terms: a pixel-wise cross-entropy term, a region-overlap Dice term and a boundary-distance term. It also adds a population-level term that asks each output point to mean the same anatomical location across patients.

The core idea fits in two sentences. Keep the graph-shaped output that makes landmark-based segmentation robust, but let the correspondence between points emerge from a hybrid mask-level loss instead of human annotation. On a dataset where manual landmarks exist but are withheld during training, we can then measure directly whether the emergent points land where experts would have put them.

Core Claim

Hybrid Graph Convolutional Neural Networks for Landmark-Based Anatomical Segmentation (HybridGNet) motivates this work and supplies the architecture. It encodes a chest radiograph with a convolutional network and decodes 166 contour landmarks with graph convolutions over a fixed connectivity. It shows that this output is anatomically plausible and robust to occlusion in ways pixel models are not, but it needs all 166 manual coordinates per image. Two-stage multi-task deep learning framework for simultaneous pelvic bone segmentation and landmark detection from CT images combines Dice, Focal and cross-entropy terms across mask, landmark-heatmap and edge heads, yet it likewise cannot be trained without its 16 annotated keypoints. Both papers use landmarks as a supervised target.

Our claim is that the target can be replaced by a loss. Region, boundary and distribution terms applied to a rasterized polygon provide enough signal to train the decoder. A group-wise compactness term then resolves what masks alone leave undetermined, namely where along the contour each point sits. The result would keep HybridGNet's shape guarantees and occlusion robustness at the annotation cost of a U-Net. It would also produce dense cross-patient correspondences as a by-product.

The obstacle is known. Joint Optimization for Multi-person Shape Models from Markerless 3D-Scans reports that geometry-only fitting lets vertices slide tangentially along smooth surfaces without paying any cost. The same paper shows that optimizing correspondence jointly with shape beats alternating between the two. That constrains our design: a boundary term alone will produce sliding, and correspondence must be optimized inside the training objective rather than fixed beforehand.

Research Program

The decoder outputs vertex coordinates $V_n$ for image $n$ over a template graph of closed polygons, one per structure (lungs, heart, clavicles). A soft rasterizer produces a differentiable mask $R(V_n)$. Training minimizes

$$ \mathcal{L} = \alpha\,\mathrm{BCE}(R(V_n), Y_n) + \beta\,\mathrm{Dice}(R(V_n), Y_n) + \gamma\,\mathrm{CD}(V_n, \partial Y_n) + \lambda\,\mathcal{C}(\{V_n\}), $$

The terms are defined as follows. $Y_n$ is the ground-truth mask and $\partial Y_n$ its extracted contour points. $\mathrm{CD}$ is the symmetric Chamfer distance between predicted vertices and contour points. $\mathcal{C}$ is a compactness penalty equal to the total per-vertex variance of the predicted shapes after Procrustes normalization, estimated over the minibatch plus a running memory of recent shapes. Standard edge-length and Laplacian smoothness terms keep polygons regular.

Each term has a different job, following the division of labour described in Segmentation Loss Odyssey. Cross-entropy gives smooth gradients early, when the polygon and the mask barely overlap and Dice gradients are unstable. Dice gives weight to small structures, such as clavicles, independent of their size. The Chamfer term sharpens contours. Compactness penalizes the sliding that the other three terms ignore: if vertex $k$ sits at the lung apex in one patient and halfway down the rib margin in another, variance rises. The weights follow a fixed schedule, heavy on cross-entropy early and shifting to Dice and Chamfer once overlap exceeds a threshold. We tune the schedule once on validation data and report sensitivity to it, since the Odyssey paper notes that heuristic weighting is a real weakness of compound losses.

The analysis has three layers. The first is segmentation quality and anatomical validity. The second is whether correspondences emerge: after training, each of the 166 held-out JSRT landmarks is assigned once to its nearest decoder vertex index using the training split, and the landmark error of those indices is then measured on test images. The third is robustness to occlusion and to domain shift.

Baselines

The naive reference point is a U-Net trained with compound cross-entropy plus Dice from the SegLoss implementations accompanying Segmentation Loss Odyssey, which that paper recommends as the robust default. Its masks are post-processed by keeping the largest connected component per structure and filling holes. This baseline tests whether the proposal adds anything over a pixel model plus simple cleanup. On JSRT, Accurate Lung Segmentation via Network-Wise Training of Convolutional Networks reports Dice 0.980, Jaccard 0.961 and average contour distance 1.237 mm for lung fields. This is the strongest pixel-level number in our file. We will reproduce a comparable U-Net under our splits rather than compare across protocols.

The oracle reference is HybridGNet trained with the true 166 manual landmarks, using the 3-fold 70/10/20 protocol of Hybrid Graph Convolutional Neural Networks for Landmark-Based Anatomical Segmentation. That paper reports mean squared error and Hausdorff distance only in plots, so we found no reported scalar result on Lacuna for HybridGNet on JSRT and will rerun it ourselves.

The strongest landmark-free competitor is HybridGNet trained on pseudo-landmarks. For each training mask, we extract each contour, anchor it at a rule-defined start point (the topmost point of each structure) and resample it at equal arc length to the template's vertex count. We then train with the original mean-squared-error regression loss. This isolates our key ingredient, because it has the same architecture and the same annotations (masks only), with correspondence fixed before training instead of optimized through the loss.

Ablations remove the compactness term, the Chamfer term, and the cross-entropy and Dice terms in turn. They also initialize our model from the pseudo-landmark model before fine-tuning with the full loss. All models share the encoder and decoder, training epochs, augmentation and an equal hyperparameter search budget of the same number of validation runs per method.

Beating the pseudo-landmark baseline would mean one of two outcomes. Either segmentation matches it (within fold-to-fold variation) while held-out landmark error is lower, or both are equal on clean images and ours degrades less under occlusion and on the Montgomery County data. Approaching the oracle's landmark error closely enough to be clinically interchangeable would be the strongest result.

Why not just…?

Why not just post-process a U-Net's masks? On clean JSRT images this is a real threat to the segmentation claim. Hwang and Park's 0.980 Dice leaves little room, and connected-component cleanup removes most islands and holes. The proposal does not rest on beating it in clean-image Dice. It rests on two things post-processing cannot provide: correspondence (a mask has no point identities) and robustness to large occlusions. HybridGNet reports that pixel models fail under severe occlusion and that the graph decoder does not. Our occlusion experiment tests whether that advantage survives landmark-free training.

Why not just resample mask contours into pseudo-landmarks and train HybridGNet as usual? This is the simplest route and the most serious alternative, which is why it is the main baseline. Its weakness is that the correspondence is decided by an arbitrary rule. The start point and uniform spacing move with pathology and with anatomical variation in contour length, so sliding error is built into the regression targets. Zeitvogel et al.'s finding that joint optimization beats fixed or alternating correspondence is the evidence for expecting a gap. If held-out landmark error and occlusion robustness come out equal, we will report that the loss-based correspondence is unnecessary. The contribution then reduces to showing that pseudo-landmark HybridGNet already removes the annotation cost.

Why not just use a linear shape model (PCA point distribution model) fitted to aligned contours? HybridGNet benchmarks against PCA point distribution models on JSRT and reports higher error and Hausdorff distance for them. 3D Image Segmentation of Deformable Objects with Shape-Appearance Joint Prior Models notes that such models assume Gaussian, linear modes of variation. A PCA model also still needs correspondences to be built, so it inherits the pseudo-landmark problem. We include it only as a secondary reference.

Proposed Experiments

The primary study uses JSRT's 247 radiographs. Masks are used for training, and the 166 landmarks are used only for evaluation. We report Dice, Jaccard, average contour distance and Hausdorff distance per structure. We also report the fraction of predictions that are topologically invalid (holes or extra components for pixel models, self-intersecting polygons for graph models) and the held-out landmark error. Following HybridGNet's protocol, we repeat evaluation with synthetic occluding blocks of increasing size and plot each metric against occluded area.

For domain shift, models trained on JSRT are tested on the Montgomery County set's 138 pathological radiographs, using their lung masks. Accurate Lung Segmentation via Network-Wise Training of Convolutional Networks reports only that performance there was "less stable"; we found no reported number on Lacuna for Montgomery County.

A secondary study on ACDC 2017 cardiac MRI tests transfer to a structure with nested topology, the myocardium surrounding the left ventricle. Since ACDC has no landmarks, it measures segmentation and topology only. We will contextualize against Weakly Supervised Segmentation by A Deep Geodesic Prior, which reports left-ventricle Dice 0.873 under heavy label noise, by rerunning our method under the same synthetic mask noise. The decoder's fixed topology may make it less sensitive to corrupted boundaries.

Three checks decide the outcome. The first is whether removing the compactness term raises held-out landmark error while leaving Dice unchanged, which would confirm that sliding is the failure it targets. The second is whether the full loss beats pseudo-landmark regression on landmark error or occlusion robustness. The third is whether the gap to the oracle trained on manual landmarks is small enough that the 166 annotations per image can be dropped.