liom_toolkit.segmentation.vseg.predict_one module

liom_toolkit.segmentation.vseg.predict_one.predict_one(model: VsegModel, img_path: str, save_path: str, stride: int = 256, width: int = 256, norm: bool = True, dev: str = 'cuda', patching: bool = True) ndarray

Predict one image

Parameters:
  • model (VsegModel) – The model to use for prediction

  • img_path (str) – The path to the image to predict

  • save_path (str) – The path to save the results

  • stride (int) – The stride of the patches

  • width (int) – The width of the patches

  • norm (bool) – Normalize the images

  • dev (str) – The device to use for prediction

  • patching (bool) – Whether to use patching

Returns:

The predicted image

Return type:

np.ndarray