mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-09-09 11:14:32 +08:00
FIX: accept PIL Image as input
This commit is contained in:
@@ -107,6 +107,8 @@ def image_preprocess(image, size=(48,48), batch=False):
|
||||
DeprecationWarning
|
||||
)
|
||||
outImage = process_list_image(image)
|
||||
elif isinstance(image, Image.Image):
|
||||
outImage = image
|
||||
elif type(image).__name__ == "ndarray": # image is from numpy/scipy
|
||||
out_image = Image.fromarray(image)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user