• Stars
    star
    147
  • Rank 249,863 (Top 5 %)
  • Language
    Python
  • Created over 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[MICCAI'22] Neural Rendering for Stereo 3D Reconstruction of Deformable Tissues in Robotic Surgery

Neural Rendering for Stereo 3D Reconstruction of Deformable Tissues in Robotic Surgery

Implementation for MICCAI 2022 paper Neural Rendering for Stereo 3D Reconstruction of Deformable Tissues in Robotic Surgery by Yuehao Wang, Yonghao Long, Siu Hin Fan, and Qi Dou.

A NeRF-based framework for Stereo Endoscopic Surgery Scene Reconstruction (EndoNeRF).

[Paper] [Website] [Sample Dataset]

Demo

endonerf_teaser.mp4

Setup

We recommend using Miniconda to set up an environment:

cd EndoNeRF
conda create -n endonerf python=3.6
conda activate endonerf
pip install -r requirements.txt
cd torchsearchsorted
pip install .
cd ..

We managed to test our code on Ubuntu 18.04 with Python 3.6 and CUDA 10.2.

Dataset

To test our method on your own data, prepare a data directory organized in the following structure:

+ data1
    |
    |+ depth/           # depth maps
    |+ masks/           # binary tool masks
    |+ images/          # rgb images
    |+ pose_bounds.npy  # camera poses & intrinsics in LLFF format

In our experiments, stereo depth maps are obtained by STTR-Light and tool masks are extracted manually. Alternatively, you can use segmentation networks, e.g., MF-TAPNet, to extract tool masks. The pose_bounds.npy file saves camera poses and intrinsics in LLFF format. In our single-viewpoint setting, we set all camera poses to identity matrices to avoid interference of ill-calibrated poses.

Training

Type the command below to train the model:

export CUDA_VISIBLE_DEVICES=0   # Specify GPU id
python run_endonerf.py --config configs/{your_config_file}.txt

We put an example of the config file in configs/example.txt. The log files and output will be saved to logs/{expname}, where expname is specified in the config file.

Reconstruction

After training, type the command below to reconstruct point clouds from the optimized model:

python endo_pc_reconstruction.py --config_file configs/{your_config_file}.txt --n_frames {num_of_frames} --depth_smoother --depth_smoother_d 28

The reconstructed point clouds will be saved to logs/{expname}/reconstructed_pcds_{epoch}. For more options of this reconstruction script, type python endo_pc_reconstruction.py -h.

We also build a visualizer to play point cloud animations. To display reconstructed point clouds, type the command as follows.

python vis_pc.py --pc_dir logs/{expname}/reconstructed_pcds_{epoch}

Type python vis_pc.py -h for more options of the visualizer.

Evaluation

First, type the command below to render left views from the optimized model:

python run_endonerf.py --config configs/{your_config_file}.txt --render_only

The rendered images will be saved to logs/{expname}/renderonly_path_fixidentity_{epoch}/estim/. Then, you can type the command below to acquire quantitative results:

python eval_rgb.py --gt_dir /path/to/data/images --mask_dir /path/to/data/gt_masks --img_dir logs/{expname}/renderonly_path_fixidentity_{epoch}/estim/

Note that we only evaluate photometric errors due to the difficulties in collecting geometric ground truth.

Bibtex

If you find this work helpful, you can cite our paper as follows:

@inproceedings{wang2022neural,
    title={Neural Rendering for Stereo 3D Reconstruction of Deformable Tissues in Robotic Surgery},
    author={Wang, Yuehao and Long, Yonghao and Fan, Siu Hin and Dou, Qi},
    booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
    pages={431--441},
    year={2022},
    organization={Springer}
  }

Acknowledgement

More Repositories

1

FedBN

[ICLR'21] FedBN: Federated Learning on Non-IID Features via Local Batch Normalization
Python
227
star
2

3DSAM-adapter

Holistic Adaptation of SAM from 2D to 3D for Promptable Medical Image Segmentation
Python
132
star
3

Endo-FM

[MICCAI'23] Foundation Model for Endoscopy Video Analysis via Large-scale Self-supervised Pre-train
Python
124
star
4

SurRoL

[IROS'21] SurRoL: An Open-source Reinforcement Learning Centered and dVRK Compatible Platform for Surgical Robot Learning
Python
120
star
5

HarmoFL

[AAAI'22] HarmoFL: Harmonizing Local and Global Drifts in Federated Learning on Heterogeneous Medical Images
Python
79
star
6

Contrastive-COVIDNet

[IEEE JBHI'20] Contrastive Cross-site Learning with Redesigned Net for COVID-19 CT Classification
Python
55
star
7

FL-COVID

[npj Digital Medicine'21] Federated deep learning for detecting COVID-19 lung abnormalities in CT: a privacy-preserving multinational validation study. (Nature publishing group)
Python
37
star
8

DEX

[ICRA'23] Demonstration-Guided Reinforcement Learning with Efficient Exploration for Task Automation of Surgical Robot
Python
30
star
9

imFedSemi

[MICCAI'22] Dynamic Bank Learning for Semi-supervised Federated Image Diagnosis with Class Imbalance
Python
19
star
10

DLTTA

[IEEE TMI'22] DLTTA: Dynamic Learning Rate for Test-time Adaptation on Cross-domain Medical Images
Python
12
star
11

DiffusionMLS

[IPMI'23] Diffusion Model based Semi-supervised Learning on Brain Hemorrhage Images for Efficient Midline Shift Quantification
Python
11
star
12

Client-DP-FL

[MICCAI2023] Client-Level Differential Privacy via Adaptive Intermediary in Federated Medical Imaging
Python
10
star
13

TTADC

[MICCAI'22] Test-time Adaptation with Calibration of Medical Image Classification Nets for Label Distribution Shift
Python
9
star
14

ViSkill

[IROS'23] Value-Informed Skill Chaining for Policy Learning of Long-Horizon Tasks with Surgical Robot
Python
9
star
15

HeteroPFL

[ICLR'24] Heterogeneous Personalized Federated Learning by Local-Global Updates Mixing via Convergence Rate
Python
9
star
16

IOP-FL

[IEEE TMI'23] IOP-FL: Inside-Outside Personalization for Federated Medical Image Segmentation
Python
8
star
17

AI-Endo

Code repository of AI-Endo
Python
6
star
18

PICG2scoring

[MICCAI'24] Incorporating Clinical Guidelines through Adapting Multi-modal Large Language Model for Prostate Cancer PI-RADS Scoring
Python
5
star
19

GazeMedSeg

[MICCAI'24] Weakly-supervised Medical Image Segmentation with Gaze Annotations
Python
4
star
20

Efficient-AI-tool-for-liver-fibrosis-staging

Python
2
star
21

ICHSeg

[ISBI'24] Segmentation of Tiny Intracranial Hemorrhage via Learning-to-Rank Local Feature Enhancement
Python
1
star
22

SoftTissueDeformation

[IEEE TMI'24] Self-Supervised Cyclic Diffeomorphic Mapping for Soft Tissue Deformation Recovery in Robotic Surgery Scenes
1
star
23

TraumaDet

[MICCAI'24] Language-Enhanced Local-Global Aggregation Network for Multi-Organ Trauma Detection
Python
1
star