Slot-BERT: pretrained checkpoints for surgical video analysis
1 min readupdated
The Slot-BERT model is designed for self-supervised object discovery in medical video recordings. It isolates and tracks anatomical structures and surgical instruments across operative frames. Built on a frozen (without weight fine-tuning) DINO ViT-B/16 backbone, it consists of multiple components. It is well-suited for researchers and developers working in medical computer vision.
Key features
- The repository provides 3 checkpoint sets: abdominal, thoracic, and cholec.
- Each set consists of 5 separate components (including initializer, encoder, processor, decoder, and temporal_binder) that must be loaded together.
- The algorithm uses 7 slots to detect objects in video frames.
- Output data includes soft masks (soft_masks) and slot identifiers (slot_ids).
What you can do
- Run surgical video analysis using the official Python loader.
- Perform qualitative analysis and object detection in upcoming medical projects.
Example
import sys
import numpy as np
from pathlib import Path
from huggingface_hub import snapshot_download
release = Path(snapshot_download("GuiqiuLiao/slot-BERT"))
sys.path.insert(0, str(release))
from load_slotbert import load_slotbert
model = load_slotbert(
checkpoint_dir=release / "thoracic",
code_root="slot-BERT-code",
device="cpu",
)
frames = np.load("frames.npy", allow_pickle=False)
result = model(frames, color_order="BGR", seed=20261128)
Read more
DetailsEach checkpoint set is approximately 355 MB in size.
Requires Python 3.10 and dependency installation via requirements.txt.
License: PENN Academic Software License Agreement (for academic research).










Comments