From e9ea09f351ad56b8fadf687eb2f6f558cd102c5f Mon Sep 17 00:00:00 2001 From: Joshua Newton Date: Sat, 23 Mar 2024 11:19:35 -0400 Subject: [PATCH] `predict_single_npy_array`: Copy warning from inference/readme.md --- nnunetv2/inference/predict_from_raw_data.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nnunetv2/inference/predict_from_raw_data.py b/nnunetv2/inference/predict_from_raw_data.py index e9d6f3966..daeead75e 100644 --- a/nnunetv2/inference/predict_from_raw_data.py +++ b/nnunetv2/inference/predict_from_raw_data.py @@ -422,6 +422,8 @@ def predict_single_npy_array(self, input_image: np.ndarray, image_properties: di output_file_truncated: str = None, save_or_return_probabilities: bool = False): """ + WARNING: SLOW. ONLY USE THIS IF YOU CANNOT GIVE NNUNET MULTIPLE IMAGES AT ONCE FOR SOME REASON. + input_image must use SimpleITK axis ordering! (NB: if array comes from a nibabel-loaded image, you must swap the axes of both the array *and* the spacing from [x,y,z] to [z,y,x]!)