TimJaspersTue commited on
Commit
bb46c86
·
verified ·
1 Parent(s): 46586bc

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +87 -0
README.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SurgeNet
2
+ ![FIG 1.](figures/SurgeNet.png)
3
+
4
+ ## Publications
5
+ This repository contains code for the models used in the following publications:
6
+
7
+ - [Tim J.M. Jaspers *et al.*](https://arxiv.org/abs/2407.17904) - Exploring the Effect of Dataset Diversity in
8
+ Self-Supervised Learning for Surgical Computer
9
+ Vision (*accepted - Data Engineering in Medical Imaging (DEMI) - Satellite Event MICCAI 2024*)
10
+
11
+
12
+ ## Abstract
13
+ Over the past decade, computer vision applications in minimally invasive surgery have rapidly increased. Despite this growth, the
14
+ impact of surgical computer vision remains limited compared to other medical fields like pathology and radiology, primarily due to the scarcity
15
+ of representative annotated data. Whereas transfer learning from large
16
+ annotated datasets such as ImageNet has been conventionally the norm
17
+ to achieve high-performing models, recent advancements in self-supervised
18
+ learning (SSL) have demonstrated superior performance. In medical image analysis, in-domain SSL pretraining has already been shown to outperform ImageNet-based initialization. Although unlabeled data in the
19
+ field of surgical computer vision is abundant, the diversity within this data is limited. This study investigates the role of dataset diversity in
20
+ SSL for surgical computer vision, comparing procedure-specific datasets against a more heterogeneous general surgical dataset across three different downstream surgical applications.
21
+ The obtained results show that using solely procedure-specific data can lead to substantial improvements of 13.8%, 9.5%, and 36.8% compared to ImageNet pretraining. However, extending this data with more heterogeneous surgical data fur-
22
+ ther increases performance by 5.0%, 5.2%, and 2.5%, suggesting that increasing diversity within SSL data is beneficial for model performance.
23
+
24
+ ## Results
25
+ Figure below shows the performance of the models trained on different datasets for the three downstream dataset each from a unique procedure.
26
+ ![FIG 2.](figures/Results_SurgeNet.svg)
27
+
28
+ ## Models
29
+ The models used in this study are based on the [MetaFormer](https://arxiv.org/abs/2210.13452) architecture. The models are trained using a self-supervised learning approach on the SurgeNet
30
+ dataset, introduced this [paper](https://). All model weights can be downloaded from the table below.
31
+
32
+ | Model | Backbone | Epochs | Teacher Backbone | Full DINO checkpoint |
33
+ |-----------------|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
34
+ | SurgeNet | CaFormer | 25 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_checkpoint_epoch0025_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_checkpoint0025.pth?download=true) |
35
+ | SurgeNet | CaFormer |50 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_checkpoint_epoch0050_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_checkpoint0050.pth?download=true) |
36
+ | SurgeNet-Small | CaFormer |50 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNetSmall_checkpoint_epoch0050_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNetSmall_checkpoint0050.pth?download=true) |
37
+ | SurgeNet-CHOLEC | CaFormer |50 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/CHOLEC_checkpoint_epoch0050_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/CHOLEC_checkpoint0050.pth?download=true) |
38
+ | SurgeNet-RAMIE | CaFormer |50 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/RAMIE_checkpoint_epoch0050_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/RAMIE_checkpoint0050.pth?download=true) |
39
+ | SurgeNet-RARP | CaFormer |50 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/RARP_checkpoint_epoch0050_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/RARP_checkpoint0050.pth?download=true) |
40
+ | SurgeNet-Public | CaFormer |50 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/Public_checkpoint_epoch0050_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/Public_checkpoint0050.pth?download=true) |
41
+ | SurgeNet | ConvNextv2 |50 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_ConvNextv2_checkpoint_epoch0050_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_ConvNextv2_checkpoint0050.pth?download=true) |
42
+ | SurgeNet | PVTv2 |50 | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_PVTv2_checkpoint_epoch0050_teacher.pth?download=true) | [Download](https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_PVTv2_checkpoint0050.pth?download=true) |
43
+
44
+ ## Loading Model
45
+ The weights from the teacher network can be used to initialize either your classification or segmentation model using the following code snippet:
46
+ ```python
47
+ import torch
48
+ from metaformer import caformer_s18, MetaFormerFPN
49
+
50
+ urls = {
51
+ "ImageNet1k": "https://huggingface.co/sail/dl/resolve/main/caformer/caformer_s18.pth",
52
+ "SurgeNet-25epochs": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_checkpoint_epoch0025_teacher.pth?download=true",
53
+ "SurgeNet-50epochs": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_checkpoint_epoch0050_teacher.pth?download=true",
54
+ "SurgeNet-Small": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNetSmall_checkpoint_epoch0050_teacher.pth?download=true",
55
+ "SurgeNet-CHOLEC": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/CHOLEC_checkpoint_epoch0050_teacher.pth?download=true",
56
+ "SurgeNet-RAMIE": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/RAMIE_checkpoint_epoch0050_teacher.pth?download=true",
57
+ "SurgeNet-RARP": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/RARP_checkpoint_epoch0050_teacher.pth?download=true",
58
+ "SurgeNet-Public": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/Public_checkpoint0050.pth?download=true",
59
+ "SurgeNet-ConvNextv2": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_ConvNextv2_checkpoint_epoch0050_teacher.pth?download=true",
60
+ "SurgeNet-PVTv2": "https://huggingface.co/TimJaspersTue/SurgeNetModels/resolve/main/SurgeNet_PVTv2_checkpoint_epoch0050_teacher.pth?download=true",
61
+ }
62
+
63
+ # classification model
64
+ classification_model = caformer_s18(num_classes=12, pretrained='SurgeNet', pretrained_weights=urls['SurgeNet'])
65
+
66
+ # Full segmentation model
67
+ segmentation_model = MetaFormerFPN(num_classes=4, pretrained='SurgeNet', pretrained_weights=urls['SurgeNet'])
68
+
69
+ ```
70
+ Note: If your want a different version of SurgeNet weights (e.g. SurgeNet-Small), you can replace the `pretrained_weights` argument with the desired url (leave the `pretrained` argument as it is).
71
+ ## Acknowledgements
72
+ Our implementation of the feature pyramid network is based on the [pytorch segmentation models](https://segmentation-modelspytorch.readthedocs.io/en/latest/) library.
73
+ Pretraining on SurgeNet was performed using the code provided with the [DINO](https://github.com/facebookresearch/dino) publication.
74
+
75
+ ## Citation
76
+ If you find our work useful in your research please consider citing our paper:
77
+ ```bibtex
78
+ @misc{jaspers2024datasetdiversity,
79
+ title={Exploring the Effect of Dataset Diversity in Self-Supervised Learning for Surgical Computer Vision},
80
+ author={Tim J. M. Jaspers and Ronald L. P. D. de Jong and Yasmina Al Khalil and Tijn Zeelenberg and Carolus H. J. Kusters and Yiping Li and Romy C. van Jaarsveld and Franciscus H. A. Bakker and Jelle P. Ruurda and Willem M. Brinkman and Peter H. N. De With and Fons van der Sommen},
81
+ year={2024},
82
+ eprint={2407.17904},
83
+ archivePrefix={arXiv},
84
+ primaryClass={cs.CV},
85
+ url={https://arxiv.org/abs/2407.17904},
86
+ }
87
+ ```