Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into develop

refactor_docs
fengjiayi 8 years ago
commit 051f0b9946

@ -1,10 +1,10 @@
import numpy as np import numpy as np
try: try:
import cv2 import cv2
except ImportError: except:
cv2 = None print(
"import cv2 error, please install opencv-python: pip install opencv-python"
from cv2 import resize )
__all__ = [ __all__ = [
"load_image", "resize_short", "to_chw", "center_crop", "random_crop", "load_image", "resize_short", "to_chw", "center_crop", "random_crop",
@ -76,7 +76,7 @@ def resize_short(im, size):
h_new = size * h / w h_new = size * h / w
else: else:
w_new = size * w / h 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 return im

@ -18,7 +18,6 @@ setup(name='paddle',
"numpy", "numpy",
"protobuf==${PROTOBUF_VERSION}", "protobuf==${PROTOBUF_VERSION}",
"matplotlib", "matplotlib",
"opencv-python",
], ],
packages=packages, packages=packages,
package_dir={ package_dir={

Loading…
Cancel
Save