def get_img(path, mask=False): if mask: return cv2.imread(path, cv2.IMREAD_UNCHANGED) else: return cv2.imread(path)