Skip to content

Commit ffe0afc

Browse files
committed
comments
1 parent f4b17fd commit ffe0afc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

torchvision/cvtransforms.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
""" OpenCV-based transforms
2+
Operate on np.ndarrays only, no PIL or torch dependency
3+
"""
14
from __future__ import division
25
import math
36
import random
@@ -21,12 +24,12 @@ def __call__(self, tensor):
2124

2225

2326
class Scale(object):
24-
"""Rescales the input PIL.Image to the given 'size'.
27+
"""Rescales the input np.ndarray to the given 'size'.
2528
'size' will be the size of the smaller edge.
2629
For example, if height > width, then image will be
2730
rescaled to (size * height / width, size)
2831
size: size of the smaller edge
29-
interpolation: Default: PIL.Image.BILINEAR
32+
interpolation: Default: cv.INTER_CUBIC
3033
"""
3134
def __init__(self, size, interpolation=cv2.INTER_CUBIC):
3235
self.size = size

0 commit comments

Comments
 (0)