tudoulei glenn-jocher commited on
Commit
21a9607
·
unverified ·
1 Parent(s): 57f773b

`cv2.imread(img, -1)` for IMREAD_UNCHANGED (#3379)

Browse files

* Update datasets.py

* comment

Co-authored-by: Glenn Jocher <[email protected]>

Files changed (1) hide show
  1. utils/datasets.py +1 -1
utils/datasets.py CHANGED
@@ -181,7 +181,7 @@ class LoadImages: # for inference
181
  else:
182
  # Read image
183
  self.count += 1
184
- img0 = cv2.imread(path) # BGR
185
  assert img0 is not None, 'Image Not Found ' + path
186
  print(f'image {self.count}/{self.nf} {path}: ', end='')
187
 
 
181
  else:
182
  # Read image
183
  self.count += 1
184
+ img0 = cv2.imread(path, -1) # BGR (-1 is IMREAD_UNCHANGED)
185
  assert img0 is not None, 'Image Not Found ' + path
186
  print(f'image {self.count}/{self.nf} {path}: ', end='')
187