Skip to content

Commit

Permalink
add TimmBackbone example as a comment under model = CNNBackbone("resn…
Browse files Browse the repository at this point in the history
…et50") into the full pipelines version of slide-graph
  • Loading branch information
GeorgeBatch committed Nov 5, 2024
1 parent dabf9a9 commit 5c93e9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/full-pipelines/slide-graph.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
" IOSegmentorConfig,\n",
" NucleusInstanceSegmentor,\n",
")\n",
"from tiatoolbox.models.architecture.vanilla import CNNBackbone\n",
"from tiatoolbox.models.architecture.vanilla import CNNBackbone, TimmBackbone\n",
"from tiatoolbox.tools.graph import SlideGraphConstructor\n",
"from tiatoolbox.tools.patchextraction import PatchExtractor\n",
"from tiatoolbox.tools.stainnorm import get_normalizer\n",
Expand Down Expand Up @@ -681,6 +681,7 @@
" save_resolution={\"units\": \"mpp\", \"resolution\": 8.0},\n",
" )\n",
" model = CNNBackbone(\"resnet50\")\n",
" # Alternative: model = TimmBackbone(backbone=\"UNI\", pretrained=True)\n",
" extractor = DeepFeatureExtractor(batch_size=16, model=model, num_loader_workers=4)\n",
" # Injecting customized preprocessing functions,\n",
" # check the document or sample code below for API.\n",
Expand Down Expand Up @@ -2790,4 +2791,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

0 comments on commit 5c93e9a

Please sign in to comment.