Skip to content

Add a RankSEG post-processing example notebook - #1175

Open
statmlben wants to merge 1 commit into
TissueImageAnalytics:developfrom
rankseg:docs/rankseg-notebook
Open

statmlben wants to merge 1 commit into
TissueImageAnalytics:developfrom
rankseg:docs/rankseg-notebook

Conversation

@statmlben

Copy link
Copy Markdown

Related to #1172.

Thank you for suggesting an example notebook as a starting point. This PR adds a self-contained tutorial demonstrating RankSEG foreground decoding with TIAToolbox's MicroNet pipeline.

Summary

  • Add examples/13-rankseg-postprocessing.ipynb and an entry in examples/README.md.
  • Compare argmax and RankSEG using the same probabilities from the pretrained micronet-consep model on Kumar test images.
  • Apply MicroNet's instance postprocessor to both decoded masks and evaluate full-image foreground Dice.
  • Include an embedded visual comparison, saved execution outputs, and a reproducible evaluation of all 14 test images.

RankSEG is installed as an optional package within the notebook. Model weights and data are downloaded when needed.

Example results

Dice is computed per image and then averaged with equal weight.

Evaluation Images Argmax Dice RankSEG Dice Gain Images improved
CoNSeP-trained MicroNet → Kumar test set 14 61.26% 64.94% +3.68 percentage points 14/14

The illustrated case is explicitly identified as a favorable example selected after reviewing the cohort. Results describe foreground overlap on this small cross-dataset cohort; instance-separation quality requires separate evaluation.

Validation

  • Executed the notebook, including the full 14-image evaluation, on an NVIDIA RTX 3090.
  • Used Python 3.12, TIAToolbox 2.1.3, and RankSEG 0.0.8 with safe screening enabled.
  • Verified that the argmax adapter reproduces the official engine's instance output.
  • Passed pre-commit checks for the changed files.
  • Colab execution has not been separately verified.

I would appreciate feedback on the notebook's structure and its use of the TIAToolbox 2.x inference API.

This commit introduces a new Jupyter notebook (13-rankseg-postprocessing.ipynb) that compares argmax and RankSEG decoding of MicroNet probability maps. It utilizes a CoNSeP-trained model on Kumar test images, retaining TIAToolbox inference and instance postprocessing, and evaluates foreground Dice. The notebook includes visual comparisons and optional evaluations for all 14 test images.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant