API

Module Interface

RankSEG

RankSEG segmentation prediction module for optimizing segmentation metrics [1], [2].

rankseg(→ torch.Tensor)

Convert probability maps to segmentation predictions.

Integration Interface

postprocess(→ list[torch.Tensor])

Convert supported Transformers outputs into RankSEG predictions.

restore_semantic_probs(→ list[torch.Tensor])

Restore per-image semantic probability maps from supported outputs.

Sam1

Adapter for SAM1 and SAM-HQ prompt mask outputs.

Sam2

Adapter for SAM2 prompt mask outputs.

Sam3

Adapter for SAM3 instance and semantic mask outputs.

Algorithms

rankdice_ba(→ torch.Tensor)

Produce the predicted segmentation by rankdice based on the estimated output probability.

rankseg_rma(→ torch.Tensor)

Produce the predicted segmentation by rankdice based on the estimated output probability.

Distribution Interface

RefinedNormalPB

Refined Normal distribution to approximate Poisson binomial distribution.

RefinedNormal

Refined Normal distribution to approximate Poisson binomial distribution.