From a3f3a119ed91b6d7ab3120882a5bcd9bbecf3c9e Mon Sep 17 00:00:00 2001 From: Pakkapon Phongthawee Date: Fri, 18 Oct 2019 12:47:54 +0700 Subject: [PATCH 1/2] skimage >= 0.16, rescale need multichannel=True In `skimage >= 0.16`, When use `skimage.transform.rescale` need to set parameter `multichannel=True` to rescale the image if it isn't set it will crash when input image larger than 1000 pixel in width or height because output of `rescale` will be 1 channel instead of 3 channels. --- demo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/demo.py b/demo.py index c5950c9..8125fac 100644 --- a/demo.py +++ b/demo.py @@ -50,7 +50,10 @@ def main(args): if args.isDlib: max_size = max(image.shape[0], image.shape[1]) if max_size> 1000: - image = rescale(image, 1000./max_size) + try: + image = rescale(image, 1000./max_size,multichannel=True) + except: + image = rescale(image, 1000./max_size) image = (image*255).astype(np.uint8) pos = prn.process(image) # use dlib to detect face else: From 646b56c28d89720485e1a72d37e8c6d2208035d8 Mon Sep 17 00:00:00 2001 From: Pakkapon Phongthawee Date: Fri, 18 Oct 2019 12:54:50 +0700 Subject: [PATCH 2/2] Fix Travis build crash by set tensorflow < 2.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5ba7442..a1d9364 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ numpy>=1.14.3 scikit-image scipy -tensorflow +tensorflow<2.0.0