Skip to content

narenakash/ToolSeg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄 Phase-Informed Tool Segmentation for Manual Small-Incision Cataract Surgery

This repository contains the official implementation of ToolSeg, our proposed method for phase-informed surgical tool segmentation in Manual Small-Incision Cataract Surgery (MSICS).

Cataract surgery is one of the most common surgical procedures globally, yet most automated analysis methods have focused on Phacoemulsification, overlooking the widely used, low-cost MSICS technique. To bridge this gap, we introduce Sankara-MSICS, the first large-scale dataset for MSICS, featuring pixel-level annotations for 13 surgical tools across 18 phases in 53 surgery videos.

Our method, ToolSeg, enhances tool segmentation by:

  • Leveraging surgical phase information via a novel Phase-Conditional Decoder.
  • Incorporating a semi-supervised learning strategy with pseudo-labels generated by Meta’s SAM 2 foundation model.

ToolSeg achieves state-of-the-art performance, outperforming existing segmentation models on both the Sankara-MSICS and CaDIS datasets. This work aims to drive future advancements in cataract surgery automation, surgical skill analysis, and global eye care accessibility.

📢 MICCAI 2025: This work has been accepted for presentation at the International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), 2025.


🛠️ ToolSeg Architecture

ToolSeg is an encoder-decoder architecture with surgical phase conditioning to improve segmentation accuracy.

ToolSeg Encoder-Decoder Architecture


To setup the environment

  1. Create a new conda environment and activate it.
conda create -n toolseg python=3.12
conda activate toolseg
  1. Install the required packages in the new environment.
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install -r requirements.txt

To download the dataset

Download the Sankara-MSICS dataset from here.

To train the model

Make appropriate changes in config.yaml and run the following.

python main.py

Alternatively, you can override the parameters on the command line.

python main.py fold=0 condition.phase='pcd'

To infer results based on pre-trained weights

Ensure the correct parameters are added in config.yaml.

python inference.py 

About

[MICCAI 2025] Official implementation of "Phase-Informed Tool Segmentation for Manual Small-Incision Cataract Surgery"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%