Skip to content

Commit 5c93e9a

Browse files
committed
add TimmBackbone example as a comment under model = CNNBackbone("resnet50") into the full pipelines version of slide-graph
1 parent dabf9a9 commit 5c93e9a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/full-pipelines/slide-graph.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
" IOSegmentorConfig,\n",
177177
" NucleusInstanceSegmentor,\n",
178178
")\n",
179-
"from tiatoolbox.models.architecture.vanilla import CNNBackbone\n",
179+
"from tiatoolbox.models.architecture.vanilla import CNNBackbone, TimmBackbone\n",
180180
"from tiatoolbox.tools.graph import SlideGraphConstructor\n",
181181
"from tiatoolbox.tools.patchextraction import PatchExtractor\n",
182182
"from tiatoolbox.tools.stainnorm import get_normalizer\n",
@@ -681,6 +681,7 @@
681681
" save_resolution={\"units\": \"mpp\", \"resolution\": 8.0},\n",
682682
" )\n",
683683
" model = CNNBackbone(\"resnet50\")\n",
684+
" # Alternative: model = TimmBackbone(backbone=\"UNI\", pretrained=True)\n",
684685
" extractor = DeepFeatureExtractor(batch_size=16, model=model, num_loader_workers=4)\n",
685686
" # Injecting customized preprocessing functions,\n",
686687
" # check the document or sample code below for API.\n",
@@ -2790,4 +2791,4 @@
27902791
},
27912792
"nbformat": 4,
27922793
"nbformat_minor": 0
2793-
}
2794+
}

0 commit comments

Comments
 (0)