Commit bd8581a5 authored by Yu-Yang Huang's avatar Yu-Yang Huang Committed by Francisco Massa
Browse files

Fix: img.shape to img.size in RandomSizedCrop (#277)

parent 10a387a3
......@@ -690,9 +690,9 @@ class RandomSizedCrop(object):
return i, j, h, w
# Fallback
w = min(img.size[0], img.shape[1])
i = (img.shape[1] - w) // 2
j = (img.shape[0] - w) // 2
w = min(img.size[0], img.size[1])
i = (img.size[1] - w) // 2
j = (img.size[0] - w) // 2
return i, j, w, w
def __call__(self, img):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment