Loading utils/io_utils.py +4 −1 Original line number Diff line number Diff line Loading @@ -90,6 +90,9 @@ def imread(imgpath, read_type=cv2.IMREAD_COLOR): return None # img = cv2.imdecode(np.fromfile(imgpath, dtype=np.uint8), read_type) img = np.array(Image.open(imgpath).convert('RGB')) if read_type == cv2.IMREAD_GRAYSCALE: img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) else: img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR) return img Loading Loading
utils/io_utils.py +4 −1 Original line number Diff line number Diff line Loading @@ -90,6 +90,9 @@ def imread(imgpath, read_type=cv2.IMREAD_COLOR): return None # img = cv2.imdecode(np.fromfile(imgpath, dtype=np.uint8), read_type) img = np.array(Image.open(imgpath).convert('RGB')) if read_type == cv2.IMREAD_GRAYSCALE: img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) else: img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR) return img Loading