We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4b17fd commit ffe0afcCopy full SHA for ffe0afc
torchvision/cvtransforms.py
@@ -1,3 +1,6 @@
1
+""" OpenCV-based transforms
2
+ Operate on np.ndarrays only, no PIL or torch dependency
3
+"""
4
from __future__ import division
5
import math
6
import random
@@ -21,12 +24,12 @@ def __call__(self, tensor):
21
24
22
25
23
26
class Scale(object):
- """Rescales the input PIL.Image to the given 'size'.
27
+ """Rescales the input np.ndarray to the given 'size'.
28
'size' will be the size of the smaller edge.
29
For example, if height > width, then image will be
30
rescaled to (size * height / width, size)
31
size: size of the smaller edge
- interpolation: Default: PIL.Image.BILINEAR
32
+ interpolation: Default: cv.INTER_CUBIC
33
"""
34
def __init__(self, size, interpolation=cv2.INTER_CUBIC):
35
self.size = size
0 commit comments