lazyslide_models.base.FeaturePredictionModel

lazyslide_models.base.FeaturePredictionModel#

class FeaturePredictionModel#

Bases: ModelBase

Base class for models that predict from a tile-feature matrix.

Two class-level flags tell the runner how to feed the model. The defaults describe a per-tile model, which the runner may batch freely:

Attributes:
features_model_namestr, optional

Registry key of the vision model whose features this model consumes. Used to resolve the input feature table when the caller does not name one.

needs_coordsbool, default: False

Whether predict requires tile coordinates. When set, the runner passes an [n_tiles, 2] array of tile origins as coords.

whole_slidebool, default: False

Whether the model must see every tile in a single call. Set this for models with spatial context — batching them would silently produce wrong predictions, since each batch would only see part of the slide.