Shortcuts

SegFormerBaseline

class torch_uncertainty.baselines.segmentation.SegFormerBaseline(num_classes, loss, version, arch)[source]

SegFormer backbone baseline for segmentation providing support for various versions and architectures.

Parameters:
  • num_classes (int) – Number of classes to predict.

  • loss (type[Module]) – Training loss.

  • version (str) –

    Determines which SegFormer version to use. Options are:

    • "std": original SegFormer

  • arch (int) –

    Determines which architecture to use. Options are:

    • 0: SegFormer-B0

    • 1: SegFormer-B1

    • 2: SegFormer-B2

    • 3: SegFormer-B3

    • 4: SegFormer-B4

    • 5: SegFormer-B5

  • num_estimators (int, optional) – Number of estimators in the ensemble. Defaults to 1 (single model).