nondefaced_detector.prediction.predict

predict(volumes, model_path, n_slices=32)[source]

Return predictions from a list of input volumes.

Parameters
  • volumes (list) – A list of Path like strings to the volumes to make the prediction on.

  • model_path (str - Path) – The path to pretrained model weights.

  • n_slices (int, optional, default=32) – The number of 2D slices of the MRI volume to predict on.

Returns

A list of predicted probabilities.

Return type

list