Package: diffpose
DiffPoseIntraoperative 2D/3D registration via differentiable X-ray renderingInstallTo installDiffPoseand the requirements inenvironment.yml,
run:pipinstalldiffposeThe differentiable X-ray renderer that powers the backend ofDiffPoseis available atDiffDRR.DatasetsWe evaluateDiffPosenetworks on the following open-source datasets:DatasetAnatomy# of Subjects# of 2D ImagesCTsX-raysFiducialsDeepFluoroPelvis6366✅✅❌LjubljanaCerebrovasculature1020✅✅✅DeepFluoro(Grupp et al.,
2020)
provides paired X-ray fluoroscopy images and CT volume of the pelvis.
The data were collected from six cadaveric subjects at John Hopkins
University. Ground truth camera poses were estimated with an offline
registration process. A visualization of one X-ray / CT pair in theDeepFluorodataset is availablehere.mkdir-pdata/
wget--no-check-certificate-Odata/ipcai_2020_full_res_data.zip"http://archive.data.jhu.edu/api/access/datafile/:persistentId/?persistentId=doi:10.7281/T1/IFSXNV/EAN9GH"unzip-odata/ipcai_2020_full_res_data.zip-ddata
rmdata/ipcai_2020_full_res_data.zipLjubljana(Mitrovic et al.,
2013)
provides paired 2D/3D digital subtraction angiography (DSA) images.
The data were collected from 10 patients undergoing endovascular
image-guided interventions at the University of Ljubljana. Ground
truth camera poses were estimated by registering surface fiducial
markers.mkdir-pdata/
wget--no-check-certificate-Odata/ljubljana.zip"https://drive.google.com/uc?export=download&confirm=yes&id=1x585pGLI8QGk21qZ2oGwwQ9LMJ09Tqrx"unzip-odata/ljubljana.zip-ddata
rmdata/ljubljana.zipExperimentsTo run the experiments inDiffPose, run the following scripts (ensure
you’ve downloaded the data first):# DeepFluoro datasetcdexperiments/deepfluoro
srunpythontrain.py# Pretrain pose regression CNN on synthetic X-rayssrunpythonregister.py# Run test-time optimization with the best network per subject# Ljubljana datasetcdexperiments/ljubljana
srunpythontrain.py
srunpythonregister.pyThe training and test-time optimization scripts use SLURM to run on all
subjects in parallel:experiments/deepfluoro/train.pyis configured to run across six
A6000 GPUsexperiments/deepfluoro/register.pyis configured to run across six
2080 Ti GPUsexperiments/ljubljana/train.pyis configured to run across twenty
2080 Ti GPUsexperiments/ljubljana/register.pyis configured to run on twenty
2080 Ti GPUsThe GPU configurations can be changed at the end of each script usingsubmitit.DevelopmentDiffPosepackage, docs, and CI are all built usingnbdev. To get set up withnbdev, install
the followingcondainstalljupyterlabnbdev-cfastai-cconda-forgenbdev_install_quarto# To build docsnbdev_install_hooks# Make notebooks git-friendlypipinstall-e".[dev]"# Install the development verison of DiffPoseRunningnbdev_helpwill give you the full list of options. The most
important ones arenbdev_preview# Render docs locally and inspect in browsernbdev_clean# NECESSARY BEFORE PUSHINGnbdev_test# tests notebooksnbdev_export# builds package and builds docsnbdev_readme# Render the readmeFor more details, follow thisin-depth
tutorial.CitingDiffPoseIf you findDiffPoseorDiffDRRuseful in your work,
please cite the appropriate papers:@inproceedings{gopalakrishnanDiffDRR2022,
    author    = {Gopalakrishnan, Vivek and Golland, Polina},
    title     = {Fast Auto-Differentiable Digitally Reconstructed Radiographs for Solving Inverse Problems in Intraoperative Imaging},
    year      = {2022},
    booktitle = {Clinical Image-based Procedures: 11th International Workshop, CLIP 2022, Held in Conjunction with MICCAI 2022, Singapore, Proceedings},
    series    = {Lecture Notes in Computer Science},
    publisher = {Springer},
    doi       = {https://doi.org/10.1007/978-3-031-23179-7_1},
}