Official code of the paper 4D-OR: Semantic Scene Graphs for OR Domain Modeling (https://link.springer.com/chapter/10.1007/978-3-031-16449-1_45) published at MICCAI 2022.
PDF Paper: https://link.springer.com/content/pdf/10.1007/978-3-031-16449-1_45.pdf?pdf=inline%20link
PDF Book: https://link.springer.com/content/pdf/10.1007/978-3-031-16449-1.pdf?pdf=button%20sticky
Oral Presentation at MICCAI22: https://youtu.be/U_VUr-IPIPE
We publish both a new dataset, 4D-OR and our code.
Authors: Ege Özsoy, Evin Pınar Örnek, Ulrich Eck, Tobias Czempiel, Federico Tombari, Nassir Navab
@Article{Özsoy2023,
author={{\"O}zsoy, Ege
and Czempiel, Tobias
and {\"O}rnek, Evin P{\i}nar
and Eck, Ulrich
and Tombari, Federico
and Navab, Nassir},
title={Holistic OR domain modeling: a semantic scene graph approach},
journal={International Journal of Computer Assisted Radiology and Surgery},
year={2023},
doi={10.1007/s11548-023-03022-w},
url={https://doi.org/10.1007/s11548-023-03022-w}
}
@inproceedings{Özsoy2022_4D_OR,
title={4D-OR: Semantic Scene Graphs for OR Domain Modeling},
author={Ege Özsoy, Evin Pınar Örnek, Ulrich Eck, Tobias Czempiel, Federico Tombari, Nassir Navab},
booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
year={2022},
organization={Springer}
}
@inproceedings{Özsoy2021_MSSG,
title={Multimodal Semantic Scene Graphs for Holistic Modeling of Surgical Procedures},
author={Ege Özsoy, Evin Pınar Örnek, Ulrich Eck, Federico Tombari, Nassir Navab},
booktitle={Arxiv},
year={2021}
}
4D-OR includes a total of 6734 scenes, recorded by six calibrated RGB-D Kinect sensors 1 mounted to the ceiling of the OR, with one frame-per-second, providing synchronized RGB and depth images. We provide fused point cloud sequences of entire scenes, automatically annotated human 6D poses and 3D bounding boxes for OR objects. Furthermore, we provide SSG annotations for each step of the surgery together with the clinical roles of all the humans in the scenes, e.g., nurse, head surgeon, anesthesiologist. More details are provided in the paper.
To use it:
Please refer to README in external_src. The rest assumes you have completed the steps described in that README.
cd
into scene_graph_prediction and run pip install -r requirements.txt
wget https://github.com/egeozsoy/4D-OR/releases/download/v0.1/scene_graph_prediction_files.zip
and unzippaper_model_no_gt_no_images.pth
and paper_model_no_gt_with_images.pth.pth
to scene_graph_prediction/scene_graph_helpers/paper_weights
cd
into pointnet2_dir and (optionally run pip install -r requirements.txt
) and then run CUDA_HOME=/usr/local/cuda-11.3 pip install pointnet2_ops_lib/.
Run pip install torch-scatter==2.0.9 torch-sparse==0.6.12 torch-cluster==1.5.9 torch-spline-conv==1.2.1 torch-geometric==2.0.2 -f https://data.pyg.org/whl/torch-1.10.0+cu113.html
cd
to root dirpython compute_instance_labels.py
. There are some parameters you can adjust. Alternatively, you can just download the
instance_labels from github, and put them into the INSTANCE_LABELS_PRED_PATH folder.We use https://github.com/ShunChengWu/3DSSG as a starting point for our scene graph prediction codebase.
cd
into scene_graph_predictionpython -m scene_graph_prediction.main --config no_gt.json
python -m scene_graph_prediction.main --config no_gt_image.json
evaluate
and rerun using the same command as before
infer
run python -m scene_graph_prediction.main --config no_gt.json
or python -m scene_graph_prediction.main --config no_gt_image.json
. You can use the paper weights again as described before
visualize_scene_graph_predictions.py
python -m role_prediction.heuristic_based_role_prediction
to use heuristics to predict rolespython -m role_prediction.graphormer.entry --num_workers 12 --batch_size 1 --dataset_name role_prediction --gpus 1 --accelerator ddp --precision 16 --ffn_dim 80 --hidden_dim 80 --num_heads 8 --dropout_rate 0.1 --attention_dropout_rate 0.1 --intput_dropout_rate 0.1 --n_layers 12 --peak_lr 2e-4 --edge_type multi_hop --multi_hop_max_dist 5 --spatial_pos_max 16 --check_val_every_n_epoch 10 --warmup_updates 40000 --tot_updates 400000 --default_root_dir role_prediction_save_dir_images
python -m role_prediction.graphormer.entry --num_workers 12 --batch_size 1 --dataset_name role_prediction --gpus 1 --accelerator ddp --precision 16 --ffn_dim 80 --hidden_dim 80 --num_heads 8 --dropout_rate 0.1 --attention_dropout_rate 0.1 --intput_dropout_rate 0.1 --n_layers 12 --peak_lr 2e-4 --edge_type multi_hop --multi_hop_max_dist 5 --spatial_pos_max 16 --check_val_every_n_epoch 10 --default_root_dir save_dir --checkpoint_path role_prediction_save_dir_images/lightning_logs/checkpoints/role_prediction-epoch=199-valid_ap=0.0000.ckpt --test --role_prediction_save_name graphormer_based_role_predictions.json
python -m surgery_phase_recognition.recognize_surgery_phase
to predict surgery phases from scene graphspython -m surgery_phase_recognition.evaluate_surgery_phase_recognition
to evaluate the results.