Skip to content

Commit

Permalink
cv2.imread(img, -1) for IMREAD_UNCHANGED (ultralytics#3379)
Browse files Browse the repository at this point in the history
* Update datasets.py

* comment

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
(cherry picked from commit 21a9607)
  • Loading branch information
tudoulei authored and Lechtr committed Jun 14, 2021
1 parent c316d44 commit 533a0d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def __next__(self):
else:
# Read image
self.count += 1
img0 = cv2.imread(path) # 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='')

Expand Down

0 comments on commit 533a0d3

Please sign in to comment.