瀏覽代碼

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

* Update datasets.py

* comment

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
modifyDataloader
tudoulei GitHub 3 年之前
父節點
當前提交
21a9607e00
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py 查看文件

@@ -181,7 +181,7 @@ class LoadImages: # for inference
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='')


Loading…
取消
儲存