未验证 提交 b5871048 编写于 作者: T Teng Xi 提交者: GitHub

change scipy.misc.imread() to imageio.imread() (#324)

上级 56cd1eca
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import numpy as np import numpy as np
import scipy.misc import imageio
import os import os
import paddle import paddle
from paddle import fluid from paddle import fluid
...@@ -54,7 +54,7 @@ class CASIA_Face(object): ...@@ -54,7 +54,7 @@ class CASIA_Face(object):
target = self.label_list[index] target = self.label_list[index]
try: try:
img = scipy.misc.imread(img_path) img = imageio.imread(img_path)
except: except:
continue continue
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import numpy as np import numpy as np
import scipy.misc import imageio
import paddle import paddle
from paddle import fluid from paddle import fluid
...@@ -33,10 +32,10 @@ class LFW(object): ...@@ -33,10 +32,10 @@ class LFW(object):
return return
index = self.shuffle_idx.pop(0) 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: if len(imgl.shape) == 2:
imgl = np.stack([imgl] * 3, 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: if len(imgr.shape) == 2:
imgr = np.stack([imgr] * 3, 2) imgr = np.stack([imgr] * 3, 2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册