mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-24 14:44:21 +08:00
Update stream_loaders.py to Path().absolute()
(#2915)
This commit is contained in:
parent
fd94d312da
commit
90ec434ebb
@ -156,7 +156,7 @@ class LoadImages:
|
|||||||
path = Path(path).read_text().rsplit()
|
path = Path(path).read_text().rsplit()
|
||||||
files = []
|
files = []
|
||||||
for p in sorted(path) if isinstance(path, (list, tuple)) else [path]:
|
for p in sorted(path) if isinstance(path, (list, tuple)) else [path]:
|
||||||
p = str(Path(p).resolve())
|
p = str(Path(p).absolute()) # do not use .resolve() https://github.com/ultralytics/ultralytics/issues/2912
|
||||||
if '*' in p:
|
if '*' in p:
|
||||||
files.extend(sorted(glob.glob(p, recursive=True))) # glob
|
files.extend(sorted(glob.glob(p, recursive=True))) # glob
|
||||||
elif os.path.isdir(p):
|
elif os.path.isdir(p):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user