From 0450e6d24dba9e127ac1af766ca7b7e4469ace21 Mon Sep 17 00:00:00 2001 From: tudoulei <34886368+tudoulei@users.noreply.github.com> Date: Sat, 29 May 2021 08:58:10 +0800 Subject: [PATCH 1/2] Update datasets.py --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index 7dd181400da5..decd20aa3254 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -181,7 +181,7 @@ def __next__(self): else: # Read image self.count += 1 - img0 = cv2.imread(path) # BGR + img0 = cv2.imread(path,-1) # BGR assert img0 is not None, 'Image Not Found ' + path print(f'image {self.count}/{self.nf} {path}: ', end='') From a5074ebc38ed7e98a2eb850eb53d60dc08f2c6cb Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 29 May 2021 21:09:14 +0200 Subject: [PATCH 2/2] comment --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index decd20aa3254..331df8ffd047 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -181,7 +181,7 @@ def __next__(self): else: # Read image self.count += 1 - img0 = cv2.imread(path,-1) # BGR + img0 = cv2.imread(path, -1) # BGR (-1 is IMREAD_UNCHANGED) assert img0 is not None, 'Image Not Found ' + path print(f'image {self.count}/{self.nf} {path}: ', end='')