|
|
@@ -255,7 +255,7 @@ class AutoShape(nn.Module): |
|
|
|
im, f = Image.open(requests.get(im, stream=True).raw if im.startswith('http') else im), im |
|
|
|
im = np.asarray(exif_transpose(im)) |
|
|
|
elif isinstance(im, Image.Image): # PIL Image |
|
|
|
im, f = np.asarray(exif_transpose(im)), getattr(im, 'filename') or f |
|
|
|
im, f = np.asarray(exif_transpose(im)), getattr(im, 'filename', f) or f |
|
|
|
files.append(Path(f).with_suffix('.jpg').name) |
|
|
|
if im.shape[0] < 5: # image in CHW |
|
|
|
im = im.transpose((1, 2, 0)) # reverse dataloader .transpose(2, 0, 1) |