|
|
@@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
import logging |
|
|
|
from copy import copy |
|
|
|
from pathlib import Path, PosixPath |
|
|
|
from pathlib import Path |
|
|
|
|
|
|
|
import math |
|
|
|
import numpy as np |
|
|
@@ -248,7 +248,7 @@ class AutoShape(nn.Module): |
|
|
|
shape0, shape1, files = [], [], [] # image and inference shapes, filenames |
|
|
|
for i, im in enumerate(imgs): |
|
|
|
f = f'image{i}' # filename |
|
|
|
if isinstance(im, (str, PosixPath)): # filename or uri |
|
|
|
if isinstance(im, (str, Path)): # filename or uri |
|
|
|
im, f = Image.open(requests.get(im, stream=True).raw if str(im).startswith('http') else im), im |
|
|
|
im = np.asarray(exif_transpose(im)) |
|
|
|
elif isinstance(im, Image.Image): # PIL Image |