callcut.pipeline.load_pipeline๐Ÿ”—

callcut.pipeline.load_pipeline(fname, *, device=None)[source]๐Ÿ”—

Load a complete pipeline from a file.

Reconstructs the model (with trained weights), feature extractor, and decoder from a file saved with save_pipeline().

Parameters:
fnamestr | Path

Path to the saved pipeline file.

devicestr | torch.device | None

Device to load the model to (e.g., "cpu", "cuda:0", "mps"). If None, uses the default torch device.

Returns:
modelBaseDetector

The trained model with loaded weights.

extractorBaseExtractor

Feature extractor matching the modelโ€™s expected input.

decoderBaseDecoder

Decoder for converting probabilities to intervals.

See also

save_pipeline

Save a pipeline to a file.

Examples

>>> from callcut.pipeline import load_pipeline
>>>
>>> model, extractor, decoder = load_pipeline("pipeline.pt", device="cpu")