Skip to content

ailab-kyunghee/SurgX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SurgX: Neuron–Concept Association for Explainable Surgical Phase Recognition (MICCAI 2025)

This repository contains the official implementation of the SurgX paper (MICCAI 2025): SurgX: Neuron–Concept Association for Explainable Surgical Phase Recognition

Project Page


Installation

Create a new conda environment and install all dependencies:

conda create -n SurgX --python=3.8
conda activate SurgX
pip install -r requirements.txt

STEP 1: Neuron–Concept Annotation

Annotate neurons of ASFormer’s penultimate layer.

cd spr_models/ASFormer

There are four options for --action:

python main.py --action [train|extract_activations|predict|extract_contributions]
  1. Train the model:
python main.py --action train
  1. Save activations of the train dataset:
python main.py --action extract_activations
  1. Run the neuron–concept annotation pipeline:
cd ../../
python 0_extract_sequence_features.py
python 0_extract_text_features.py
python 1_neuron_concept_annotation.py

Optional – visualize which concepts neurons learn:

python 2_visualize_neuron_concepts.py
python 3_make_videos.py
python 4_make_videos_with_info.py
python 5_make_integrated_videos_with_info.py

STEP 2: Model Prediction Explanation

Generate explanations for ASFormer predictions.

cd spr_models/ASFormer
  1. Run prediction on the test dataset:
python main.py --action predict
  1. Save contributions of the test dataset:
python main.py --action extract_contributions
  1. Create explanations:
cd ../../
python 6_explain_prediction.py

Optional – visualize the explanations as MP4:

python 7_make_mp4.py

Concept Sets

Concept sets are located under the concept_sets/ folder:

  1. CholecT45-W
  2. CholecT45-S
  3. ChoLec-270

Acknowledgments

The surgical phase recognition models are based on TeCNO and ASFormer.

The vision–language model used for neuron–concept annotation is SurgVLP.

We thank all the authors for their efforts and open-source contributions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages