(im, size, interp='bilinear')
| 7 | |
| 8 | |
| 9 | def 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 | |
| 22 | class BaseDataset(torch.utils.data.Dataset): |
no outgoing calls
no test coverage detected