accimage icon indicating copy to clipboard operation
accimage copied to clipboard

"Integer argument expected" for img.crop

Open ajbrock opened this issue 6 years ago • 0 comments

Installing and switching to the accimage backend breaks my transforms.RandomResizedCrop. The fix I've found is modifying crop() in torchvisions.transforms.functional so that it does

img.crop((int(j), int(i), int(j + w), int(i + h)))

instead of

img.crop((j, i, j + w, i + h))

(sidenote: this library is deliciously fast)

ajbrock avatar Jun 07 '19 00:06 ajbrock