Model Handler

class stroke_segmentor.model_handler.ModelHandler(force_cpu: bool = False)

Bases: object

Class for model loading, inference and post processing

infer(adc_path: str | Path, dwi_path: str | Path) ndarray[Any, dtype[_ScalarType_co]]

Run inference on the provided ADC and DWI images.

Parameters:
  • adc_path (str | Path) – Path to the ADC image.

  • dwi_path (str | Path) – Path to the DWI image.

Returns:

The predicted segmentation mask.

Return type:

NDArray