Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1131 +/- ##
========================================
Coverage 99.91% 99.91%
========================================
Files 112 112
Lines 13454 13470 +16
Branches 1610 1614 +4
========================================
+ Hits 13443 13459 +16
Misses 5 5
Partials 6 6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
for more information, see https://pre-commit.ci
…ssueImageAnalytics/tiatoolbox into Add-Virchow2-distilled-models
for more information, see https://pre-commit.ci
Jiaqi-Lv
marked this pull request as ready for review
October 15, 2026 16:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds the SegFormer-B5 tissue segmentation models distilled from Virchow2, plus the inference and export fixes those models need.
The models come from Computationally Efficient Pathology Segmentation using Knowledge Distillation from Foundation Models.
New model configs
pretrained_model.yamlregisters five checkpoints fromTIACentre/Virchow2_Distilled_Segmentation_Models:segformerb5_distilled_PUMA_1/2/5segformerb5_distilled_IGNITE_1segformerb5_distilled_BEETLE_1SegFormer inference
Segformertakes an optionalclass_dict.DataParallelreplicas and feed the same feature map into every decoder projection. The model now runs each encoder stage directly and passes those hidden states todecode_head.load_state_dictunwraps checkpoints nested under amodelkey.postprocaccepts a Dask array, runs the morphology on a computed array, and returns a Dask array so the engine can write the mask to Zarr.QuPath export
Semantic-segmentation GeoJSON now uses contour hierarchy, so a nested class becomes a hole in the surrounding polygon. Classes with no pixels are skipped.
Example
Notebook
06-semantic-segmentationrunssegformerb5_distilled_PUMA_1on a whole-slide image, writes an annotation store, and shows the overlay in TIAViz.