MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / imresize

Function imresize

dataset.py:9–19  ·  view source on GitHub ↗
(im, size, interp='bilinear')

Source from the content-addressed store, hash-verified

7
8
9def imresize(im, size, interp='bilinear'):
10 if interp == 'nearest':
11 resample = Image.NEAREST
12 elif interp == 'bilinear':
13 resample = Image.BILINEAR
14 elif interp == 'bicubic':
15 resample = Image.BICUBIC
16 else:
17 raise Exception('resample method undefined!')
18
19 return im.resize(size, resample)
20
21
22class BaseDataset(torch.utils.data.Dataset):

Callers 3

__getitem__Method · 0.85
__getitem__Method · 0.85
__getitem__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected