AnyCXR: Human Anatomy Segmentation of Chest X-ray at Any Acquisition Position using Multi-stage Domain Randomized Synthetic Data with Imperfect Annotations and Conditional Joint Annotation Regularization Learning

Zifei Dong, Wenjie Wu, Jinkui Hao, Tianqi Chen, Ziqiao Weng, Bo ZhouarXiv 2025 · DOI

TL;DR

AnyCXR is a unified framework that achieves robust, multi-organ segmentation of chest X-rays (CXRs) from any acquisition angle using only synthetic training data. By combining a sophisticated 3D-to-2D domain randomization engine with a novel latent-space regularization strategy, the model achieves impressive zero-shot generalization on real-world clinical datasets, supporting downstream tasks like heart-size estimation and disease classification.

The Challenge of CXR Segmentation

Anatomical segmentation is a cornerstone of medical AI, yet CXR segmentation remains fragile and domain-specific. While excellent tools exist for 3D modalities like CT, CXRs suffer from several hurdles:

  1. Label Scarcity: Manually annotating 50+ structures across thousands of 2D images is prohibitively expensive.
  2. Acquisition Variability: Real-world CXRs include lateral and oblique views with varying exposures and patient positions.
  3. Annotation Ambiguity: 2D boundaries often reflect visual contrast rather than true 3D anatomical extent (e.g., where the lung hides behind the diaphragm).

Existing synthetic-to-real approaches often fail to capture the complexity of actual clinical practice. AnyCXR addresses this by bridging the "sim-to-real" gap through advanced randomization and regularization.

Methods

Multi-stage Domain Randomization (MSDR)

Instead of applying 2D filters to finished images, MSDR intervenes at the 3D level. It takes 3D CT volumes and randomizes Hounsfield Units (HU) for different tissue types before projecting them into 2D Digitally Reconstructed Radiographs (DRRs).

  • 3D Augmentations: The system independently varies bone-to-soft-tissue contrast, inter-bone density, and intra-bone textures.
  • Projection Geometry: Virtual X-ray source and detector positions are randomized to simulate any possible acquisition angle.
The MSDR pipeline randomizes anatomical and physical properties across three stages: pre-projection, in-projection, and post-projection.

Conditional Joint Annotation Regularization (CAR)

Synthetic labels derived from automated CT tools are often "imperfect" or "partial." CAR addresses this using a conditional autoencoder that learns a shared latent representation of anatomical layouts. If a specific organ label is missing or noisy, the CAR module enforces anatomical consistency, effectively teaching the model where organs should be based on surrounding structures and the input image.

Datasets and Evaluation

Training data was derived from CT-RATE (over 50,000 CT scans), resulting in >100,000 synthetic CXRs after a rigorous two-stage quality control process. Evaluation was conducted on synthetic cases from TotalSegmentator and real-world samples from ChestX-ray14, CheXpert, MIMIC-CXR, and Shenzhen Tuberculosis datasets, with segmentations refined by expert physicians to serve as a gold standard.

Key Results and Insights

AnyCXR demonstrates strong zero-shot performance, meaning it was never trained on a single real-world image:

  • Accuracy: Achieved a mean Dice Similarity Coefficient (DSC) of 92.5% for PA views and 88.8% for lateral (LA) views on the synthetic dataset.
  • Expert Agreement: On real-world clinical data, the model reached a DSC of 97.8% for bones in PA views and 98.2% for lungs in LA views.
  • Clinical Utility: Automated cardiothoracic ratio (CTR) estimation achieved an AUC of 0.93 for detecting cardiomegaly. Adding AnyCXR's masks improved a standard disease classifier's Mean AUROC from 80.26% to 82.30%.
The AnyCXR pipeline generates a diverse synthetic dataset that covers a significantly broader distribution than typical real-world datasets.

The core insight is that 3D randomization is superior to 2D augmentation. Standard 2D noise cannot replicate the complex physics of X-ray attenuation. By perturbing the 3D volume, the resulting 2D projections cover a much wider, more realistic distribution. Training on a full 180-degree rotation allows the model to learn a volumetric understanding of anatomy, making it inherently robust to patient rotation and non-standard positioning.

Limitations and Future Work

Current limitations include a simplified DRR engine that doesn't yet account for complex physics like X-ray scatter or beam hardening. There is also a "semantic gap" between 3D anatomical boundaries and stylistic 2D contrast lines used by radiologists. Future work may involve fine-tuning on expert-annotated real data or evolving the architecture to Transformer-based or Diffusion-based models for improved boundary precision in complex, overlapping regions.

Summary updated

BibTeX
@misc{dong2025anycxr,
  author = {Zifei Dong and Wenjie Wu and Jinkui Hao and Tianqi Chen and Ziqiao Weng and Bo Zhou},
  title = {{AnyCXR: Human Anatomy Segmentation of Chest X-ray at Any Acquisition Position using Multi-stage Domain Randomized Synthetic Data with Imperfect Annotations and Conditional Joint Annotation Regularization Learning}},
  year = {2025},
  eprint = {2512.17263},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.17263},
}
Figure