Marker mixin for models usable as feature extractors.
Detection and segmentation heads consume backbones through this small
protocol: a forward_features(x) that emits the deepest stage's
feature map, and a feature_info property enumerating every
emitted stage's spec. Implementing classes get a uniform interface
that head builders (FPN, BiFPN, …) can target.
Notes
The mixin carries no state — it only declares two abstract slots. Subclasses MUST override:
forward_features— returns the final stage's feature map (and may stash intermediate stages onselffor downstream use).feature_info— returns alist[FeatureInfo]with one entry per stage the backbone exposes.
Examples
>>> class MyBackbone(PretrainedModel, BackboneMixin):
... def forward_features(self, x):
... return self.stages(x)
... @property
... def feature_info(self):
... return [FeatureInfo(0, 64, 4), FeatureInfo(1, 128, 8)]Used by 30
- lucid.models
- lucid.models.vision.alexnet._model
- lucid.models.vision.coatnet._model
- lucid.models.vision.convnext._model
- lucid.models.vision.crossvit._model
- lucid.models.vision.cspnet._model
- lucid.models.vision.cvt._model
- lucid.models.vision.densenet._model
- lucid.models.vision.efficientformer._model
- lucid.models.vision.efficientnet._model
- lucid.models.vision.googlenet._model
- lucid.models.vision.inception._model
… 18 more
Properties
1feature_info: list[FeatureInfo]Return the per-stage feature pyramid specification.