We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef50583 commit d5476a7Copy full SHA for d5476a7
1 file changed
bioencoder/scripts/inference.py
@@ -109,7 +109,8 @@ def inference(
109
if isinstance(image, str):
110
if not os.path.isfile(image):
111
raise FileNotFoundError(f"File does not exist: {image}")
112
- image = np.asarray(Image.open(image))
+ image = Image.open(image).convert("RGB")
113
+ image = np.asarray(image)
114
elif not isinstance(image, (np.ndarray, np.generic)):
115
raise TypeError("Input must be either an image path (str) or a NumPy array.")
116
0 commit comments