Request access to ThoraCLIP
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
The weights are derived from DINOv3 and are distributed under the DINOv3 License (LICENSE_DINOv3.md); the text tower is derived from Qwen3-Embedding (Apache-2.0). By requesting access you agree to the DINOv3 License, to use the model for non-commercial research only, not to use it for clinical decision-making, and to acknowledge DINOv3 and cite the ThoraCLIP paper in publications.
Log in or Sign Up to review the conditions and access this model content.
ThoraCLIP (Qwen3-Embedding-0.6B text tower)
Video–language model for lung and pleural surgery. It is the main configuration of the paper (sliding-window training, 5 epochs, final-epoch checkpoint), seed 1. Code: https://github.com/han12580/ThoraCLIP
The paper reports the mean of five seeds (0, 1, 2, 42, 3407). This release is the seed with the highest doctor-verified gold phase F1; its results are therefore above the paper's five-seed means:
| Benchmark (paper, clip level) | This checkpoint (seed 1) | Five-seed mean ± s.d. |
|---|---|---|
| Gold phase macro-F1 (427 doctor-verified clips) | 0.748 | 0.725 ± 0.015 |
| Test phase macro-F1 (692 weakly labelled clips) | 0.577 | 0.566 ± 0.007 |
| Gold step mAP | 0.362 | 0.337 ± 0.017 |
| Test video→text R@10 (%) | 44.8 | 44.5 ± 1.1 |
| Part | |
|---|---|
| Vision | DINOv3 ViT-L/16 after continued self-supervised pretraining on surgical frames (vision_backbone/). Input is 1 fps, short side 512. |
| Video tower | Two temporal transformer layers with an attention pool, at most 64 seconds per clip, producing a 512-d embedding (video_tower.safetensors). |
| Text tower | Qwen3-Embedding-0.6B, fully fine-tuned (text_backbone/), with a 512-d projection (text_trainable.safetensors). |
| Class queries | Prototype and definition embeddings for 8 phases and 47 steps (queries.safetensors). |
Use
pip install git+https://github.com/han12580/ThoraCLIP # or clone the repo and pip install -r requirements.txt
hf download hhhsda/ThoraCLIP-0.6B --local-dir ThoraCLIP-0.6B
from thoraclip import Pipeline
model = Pipeline.from_pretrained('ThoraCLIP-0.6B')
model.classify('case.mp4', 120, 180)
Training data
- Alignment. ThoraVL clip–text pairs (903 public lung and pleural surgery teaching videos, 4,939 training clips; weak labels) plus SurgLaVi-β.
- Continued DINOv3 pretraining. Frames from public surgical videos and from hospital surgical videos, used under approval of the Scientific Research Ethics Committee of the Affiliated Zhongshan Hospital of Dalian University (No. KY2023-106-1); the recordings were de-identified before use. No hospital video, frame or patient data is distributed with these weights.
Intended use and limitations
For research on surgical workflow recognition and video–text retrieval. Not for clinical use. Phase and step labels were learned from weak, text-derived labels. Results on new procedures or centres may differ from the paper.
Licence
- Weights. The weights are derived from DINOv3 and are distributed under the DINOv3 License (
LICENSE_DINOv3.md). Publications using them must acknowledge the use of DINO Materials. - Text tower. Derived from Qwen3-Embedding (Apache-2.0); see
NOTICE_Qwen3-Embedding.txt. - Code. The inference code is MIT.
- Downloads last month
- 2