From 8d2d6d2349cc4732667888435e9f01912d80a4ba Mon Sep 17 00:00:00 2001 From: Jacobsolawetz Date: Tue, 17 Nov 2020 06:26:06 -0600 Subject: [PATCH] Update img2label_paths() (#1414) --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index c631fd0..7466ba4 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -337,7 +337,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing def img2label_paths(img_paths): # Define label paths as a function of image paths sa, sb = os.sep + 'images' + os.sep, os.sep + 'labels' + os.sep # /images/, /labels/ substrings - return [x.replace(sa, sb, 1).replace(x.split('.')[-1], 'txt') for x in img_paths] + return [x.replace(sa, sb, 1).replace('.' + x.split('.')[-1], '.txt') for x in img_paths] try: f = [] # image files