From cf7a4d31d37788023a9186a1a143a2dab0275ead Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 28 May 2020 20:50:02 -0700 Subject: [PATCH] bug fix in local to global path replacement --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index d741758c..5811142a 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -264,7 +264,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing if os.path.isfile(path): # file with open(path, 'r') as f: f = f.read().splitlines() - f = [x.replace('./', parent) for x in f if x.startswith('./')] # local to global path + f = [x.replace('./', parent) if x.startswith('./') else x for x in f] # local to global path elif os.path.isdir(path): # folder f = glob.iglob(path + os.sep + '*.*') else: