eigenvivek/DiffDRR
[MICCAI CLIP 2022] Differentiable digitally reconstructed radiographs in PyTorch
What it solves
DiffDRR provides a way to generate Digitally Reconstructed Radiographs (DRRs)—synthetic X-ray images—from 3D CT volumes. Because it is fully differentiable, it allows researchers to use gradient-based optimization to solve inverse problems in medical imaging, such as aligning 2D X-rays with 3D CT scans (2D/3D registration) or reconstructing 3D volumes from 2D projections.
How it works
It implements Siddon’s method, a classic algorithm for calculating the radiological path of an X-ray through a 3D volume, as a series of vectorized tensor operations in PyTorch. By reformulating this physics-based rendering process into tensor algebra, the library enables automatic differentiation with respect to both the camera pose and the 3D volume itself.
Who it’s for
This tool is designed for medical imaging researchers and developers working on intraoperative image guidance, surgical navigation, and computer vision tasks involving X-ray data. It is intended for those who need to integrate physics-based X-ray simulation directly into deep learning pipelines.
Highlights
- Differentiable X-ray rendering integrated as a PyTorch module.
- GPU-accelerated synthesis for fast performance.
- Supports gradient-based 2D/3D registration and volume reconstruction.
- Compatible with various camera pose representations (e.g., quaternions, rotation matrices, Euler angles).
- Pure Python implementation using PyTorch.
Related
- Project
- Project
- Project