提交 fd124c23 编写于 作者: Q qingqing01 提交者: GitHub

Merge pull request #2193 from qingqing01/image_v2

Remove opencv-python in setup
import numpy as np
try:
import cv2
except ImportError:
cv2 = None
from cv2 import resize
except:
print(
"import cv2 error, please install opencv-python: pip install opencv-python"
)
__all__ = [
"load_image", "resize_short", "to_chw", "center_crop", "random_crop",
......@@ -76,7 +76,7 @@ def resize_short(im, size):
h_new = size * h / w
else:
w_new = size * w / h
im = resize(im, (h_new, w_new), interpolation=cv2.INTER_CUBIC)
im = cv2.resize(im, (h_new, w_new), interpolation=cv2.INTER_CUBIC)
return im
......
......@@ -18,7 +18,6 @@ setup(name='paddle',
"numpy",
"protobuf==${PROTOBUF_VERSION}",
"matplotlib",
"opencv-python",
],
packages=packages,
package_dir={
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册