Skip to content
/ SdAOF Public

MICCAI 2024: Spatial-Division Augmented Occupancy Field for Bone Shape Reconstruction from Biplanar X-Rays

License

Notifications You must be signed in to change notification settings

xmed-lab/SdAOF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spatial-Division Augmented Occupancy Field for Bone Shape Reconstruction from Biplanar X-Rays

🚀 Updates

  • The code of SdAOF training & test are released (in ./scripts).
  • The pipeline of preprocessing Totalsegmentor-hip to Totalsegmentor_Pelvis_Bone_Recon_Dataset to compatable for efficient training is released (in ./Data_Preprocess).
  • The dataset for bone mesh reconstruction Totalsegmentor_Pelvis_Bone_Recon_Dataset is released.

⭐ Highlights of SdAOF

  • SdAOF introduces continuous occupancy field representation for efficient high-resolution bone shape reconstruction from biplanar X-ray images.
  • SdAOF integrates a spatial-division augmented distillation strategy to capture prevalent occlusion relationship within X-ray images.
  • SdAOF achieves SoTA performance in biplanar bone shape reconstruction, reconstructing fine-scale bone surfaces and is scalable to different resolutions without retraining. figure

🔨 Environment

  • The required CUDA version is 11.3, please ensure using this version in your environment, you may refer to this guideline to keep a separate CUDA version for the new environment.

  • Download the code, create a conda environment, and install the required packages in requirements.txt by running the following commands:

    git clone https://github.com/xmed-lab/SdAOF.git
    cd SdAOF
    conda create -n SdAOF python=3.9
    conda activate SdAOF
    pip install -r ./requirements.txt
  • TIGRE is required for simulating DRRs and geometry utils, install TIGRE by running

    wget https://github.com/CERN/TIGRE/archive/refs/tags/v2.6.zip
    unzip v2.6.zip
    pip install TIGRE-2.6/Python --no-build-isolation
  • Pointnet2 is required for calculating chamfer distance and earth mover's distance metrics, install Pointnet 2 by running

    cd ./scripts/metrics/pointnet2
    python setup.py install

💻 Prepare Dataset

  • We provide the processed Totalsegmentor_Pelvis_Bone_Recon_Dataset links: BaiduNetdisk; OneDrive; Huggingface

  • Since processing the dataset is time-consuming, we suggest directly downloading and using the processed Totalsegmentor_Pelvis_Bone_Recon_Dataset.

  • We also provide step-by-step instructions to reproduce the preprocessing pipeline in ./Data_Preprocess. If you are interested, please refer to it for more details.

🔑 Train and Evaluate

  • We provide the checkpoint of trained Teacher OF Net and SdAOF Net in the following links, you can download them for direct inference

    Net Link
    Teacher OF Net BaiduNetdisk; OneDrive
    SdAOF Net BaiduNetdisk; OneDrive
  • All scripts related to training and evaluation are in ./scripts. Change to this directory first: cd ./scripts.

  • The training of SdAOF consists of two stages.

    • Train the Teacher OF Net by running
      CUDA_VISIBLE_DEVICES="YOUR_GPU_ID" python train_teacher_OFNet.py --name Teacher_OF_Net --data_root YOUR_DIRECTORY_TO_DATASET --out_res 128 --save_interval 50 --eval_interval 50 
      The saved checkpoint is in ./scripts/logs/Teacher_OF_Net/best_epoch.pth by default.
    • Train the SdAOF Net by running
      CUDA_VISIBLE_DEVICES="YOUR_GPU_ID" python train_SdAOFNet.py --name SdAOF --data_root YOUR_DIRECTORY_TO_DATASET --teacher_ckpt_path YOUR_DIRECTORY_TO_SAVED_TEACHER_OFNET_CHECKPOINT --out_res 128 --save_interval 50 --eval_interval 50 --distill_individual_feat_alpha 0.2  
      The saved checkpoint is in ./scripts/logs/SdAOF/best_epoch.pth by default.
    • During training, you can config your wandb account, and track training statistics by adding configurations as below
      --wandb --project WANDB_PROJECT_NAME --entity YOUR_WANDB_ENTITY
  • Evaluate the trained SdAOF by running

    CUDA_VISIBLE_DEVICES="YOUR_GPU_ID" python eval.py --name SdAOF --data_root YOUR_DIRECTORY_TO_DATASET --ckpt_path YOUR_DIRECTORY_TO_SAVED_SdAOFNET_CHECKPOINT --out_res 336 --eval_mesh_npoint 4096 

    Evaluation results is saved in ./scripts/Eval_results.

📘 Results

figure

figure

📚 Citation

If you find our paper helps you, please kindly cite our paper in your publications.

@inproceedings{chen2024spatial,
  title={Spatial-division augmented occupancy field for bone shape reconstruction from biplanar x-rays},
  author={Chen, Jixiang and Lin, Yiqun and Sun, Haoran and Li, Xiaomeng},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={668--678},
  year={2024},
  organization={Springer}
}

🍻 Acknowledge

We sincerely appreciate XrayTo3DPreprocess for sharing the processing code implementations for Totalsegmentor Dataset.

About

MICCAI 2024: Spatial-Division Augmented Occupancy Field for Bone Shape Reconstruction from Biplanar X-Rays

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published