PreprocessObjectImage

Inheritance diagram of PreprocessObjectImage

PreprocessObjectImage inheritance diagram

class savant.base.model.PreprocessObjectImage(module, class_name, kwargs=None, dev_mode=False, output_image=None)

Object image preprocessing function configuration.

output_image: OutputImage | None = None
__call__(*args, **kwargs)

Calls resolved PyFunc implementation if its a subclass of BasePyFuncCallableImpl, otherwise no-op.

check_reload()

Checks if reload is needed and reloads in case it is.

dev_mode: bool = False

Whether the pyfunc is in dev mode.

property instance: BasePyFuncImpl

Returns resolved PyFunc implementation.

kwargs: Dict[str, Any] | None = None

Class initialization keyword arguments.

load_user_code()

Load (or reload) the user module/class specified in the PyFunc fields. It’s necessary to call this at least once before starting the pipeline.

module: str

Name to import or module path.

class_name: str

Python class name to instantiate.