diff --git a/demo/slimfacenet/dataloader/casia.py b/demo/slimfacenet/dataloader/casia.py index 4162ef46b5aebdaa6cb6bb4b70a817cb5948df15..cbec2a382dce3259edbe6be82090a227f0cac092 100644 --- a/demo/slimfacenet/dataloader/casia.py +++ b/demo/slimfacenet/dataloader/casia.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import numpy as np -import scipy.misc +import imageio import os import paddle from paddle import fluid @@ -54,7 +54,7 @@ class CASIA_Face(object): target = self.label_list[index] try: - img = scipy.misc.imread(img_path) + img = imageio.imread(img_path) except: continue diff --git a/demo/slimfacenet/dataloader/lfw.py b/demo/slimfacenet/dataloader/lfw.py index 46bb60c9f33ad7ae7d67267825ad5af356d3f574..4812ba1a2e37d3f86609deb32994998522012cf5 100644 --- a/demo/slimfacenet/dataloader/lfw.py +++ b/demo/slimfacenet/dataloader/lfw.py @@ -13,8 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import numpy as np -import scipy.misc - +import imageio import paddle from paddle import fluid @@ -33,10 +32,10 @@ class LFW(object): return index = self.shuffle_idx.pop(0) - imgl = scipy.misc.imread(self.imgl_list[index]) + imgl = imageio.imread(self.imgl_list[index]) if len(imgl.shape) == 2: imgl = np.stack([imgl] * 3, 2) - imgr = scipy.misc.imread(self.imgr_list[index]) + imgr = imageio.imread(self.imgr_list[index]) if len(imgr.shape) == 2: imgr = np.stack([imgr] * 3, 2)