glenn-jocher
commited on
Commit
•
b83e1a4
1
Parent(s):
1f69d12
Fix `img2label_paths()` order (#3720)
Browse files* Fix `img2label_paths()` order
* fix, 1
- utils/datasets.py +1 -1
utils/datasets.py
CHANGED
@@ -348,7 +348,7 @@ class LoadStreams: # multiple IP or RTSP cameras
|
|
348 |
def img2label_paths(img_paths):
|
349 |
# Define label paths as a function of image paths
|
350 |
sa, sb = os.sep + 'images' + os.sep, os.sep + 'labels' + os.sep # /images/, /labels/ substrings
|
351 |
-
return [
|
352 |
|
353 |
|
354 |
class LoadImagesAndLabels(Dataset): # for training/testing
|
|
|
348 |
def img2label_paths(img_paths):
|
349 |
# Define label paths as a function of image paths
|
350 |
sa, sb = os.sep + 'images' + os.sep, os.sep + 'labels' + os.sep # /images/, /labels/ substrings
|
351 |
+
return [sb.join(x.rsplit(sa, 1)).rsplit('.', 1)[0] + '.txt' for x in img_paths]
|
352 |
|
353 |
|
354 |
class LoadImagesAndLabels(Dataset): # for training/testing
|