44edfba78536668c2240e8e722029741a547bd9a,chainercv/transforms/image/rotate.py,,rotate,#Any#Any#Any#Any#Any#,21
Before Change
_check_available()
// http://scikit-image.org/docs/dev/api/skimage.transform.html//warp
if interpolation == PIL.Image.NEAREST:
interpolation_order = 0
elif interpolation == PIL.Image.BILINEAR:
interpolation_order = 1
elif interpolation == PIL.Image.BICUBIC:
interpolation_order = 3
return scipy.ndimage.rotate(
img, angle, axes=(2, 1), reshape=expand,
order=interpolation_order, cval=fill)
After Change
returns an array :obj:`out_img` that is the result of rotation.
if chainer.config.cv_rotate_backend == "cv2":
if _cv2_available:
return _rotate_cv2(img, angle, expand, fill, interpolation)
else:
warnings.warn(
"Although `chainer.config.cv_rotate_backend == "cv2"`, "
"cv2 is not found. As a fallback option, rotate uses "
"PIL. Either install cv2 or set "
"`chainer.global_config.cv_rotate_backend = "PIL"` to "
"suppress this warning.")
return _rotate_pil(img, angle, expand, fill, interpolation)
elif chainer.config.cv_rotate_backend == "PIL":
return _rotate_pil(img, angle, expand, fill, interpolation)
else:
raise ValueError("chainer.config.cv_rotate_backend should be "
"either "cv2" or "PIL".")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: chainer/chainercv
Commit Name: 44edfba78536668c2240e8e722029741a547bd9a
Time: 2018-11-20
Author: yuyuniitani@gmail.com
File Name: chainercv/transforms/image/rotate.py
Class Name:
Method Name: rotate
Project Name: keras-team/autokeras
Commit Name: 13aa31bc1a0b87d6c4b5e787c9b041ec83831c34
Time: 2020-07-31
Author: jin@tamu.edu
File Name: autokeras/blocks/reduction.py
Class Name: SpatialReduction
Method Name: build
Project Name: keras-team/keras
Commit Name: ee8ff00a2a8a307c952fb8e7bef241188c7fb12b
Time: 2016-07-03
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: pool2d