Downloads · 30 days
0
SsharvienKumar/SurGrID
SurGrID is a machine learning model from SsharvienKumar. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-4.0.
Downloads · 30 days
0
Access
Public
Updated Jun 11, 2025
Repo size
10.6 GB
Likes
0
Public
Click a slice to open those files.
.zip6.8 GB · 100%
From the Hugging Face model README
git clone https://github.com/MECLabTUDA/SurGrID.git
cd SurGrID
conda create -n surgrid python=3.8.5 pip=20.3.3
conda activate surgrid
pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
Download the checkpoints of all the necessary models from the provided sources and place them in [results](./results). We also provide the processed CADIS dataset, containing images, segmentation masks and their scene graphs. Update the paths of the dataset in [configs](./configs).
Checkpoints: VQGANs, GraphEncoders, Diffusion ModelProcessed Dataset: CADISpython script/sampler_diffusion.py --conf configs/eval/eval_combined_emb.yaml
Step 1: Train Separate VQGAN for Image and Segmentation
python surgrid/taming/main.py --base configs/vqgan/vqgan_image_cadis.yaml -t --gpus 0,
python surgrid/taming/main.py --base configs/vqgan/vqgan_segmentation_cadis.yaml -t --gpus 0,
Step 2: Train Both Graph Encoder
python script/trainer_graph.py --mode masked --conf configs/graph/graph_cadis.yaml
python script/trainer_graph.py --mode segclip --conf configs/graph/graph_cadis.yaml
Step 3: Train Diffusion Model
python script/trainer_diffusion.py --conf configs/trainer/combined_emb.yaml
The files below needs to be adapted:
python script/demo_surgrid.py --conf configs/trainer/combined_emb.yaml
Our demo GUI allows for loading ground-truth graphs along with the ground-truth image. The graph’s nodes can be moved, deleted, or have their class changed. We instruct our participants to load four different ground-truth graphs and sequentially perform the following actions on each. They are requested to score the samples’ realism and coherence with the graph input using a Likert scale of 1 to 7:
If you are using SurGrID for your paper, please cite the following paper:
@article{frisch2025surgrid,
title={SurGrID: Controllable Surgical Simulation via Scene Graph to Image Diffusion},
author={Frisch, Yannik and Sivakumar, Ssharvien Kumar and K{\"o}ksal, {\c{C}}a{\u{g}}han and B{\"o}hm, Elsa and Wagner, Felix and Gericke, Adrian and Ghazaei, Ghazal and Mukhopadhyay, Anirban},
journal={arXiv preprint arXiv:2502.07945},
year={2025}
}
Thanks for the following projects and theoretical works that we have either used or inspired from: