Skip to content

Commit

Permalink
Fix cv2.imread
Browse files Browse the repository at this point in the history
  • Loading branch information
sansoohan committed Aug 7, 2024
1 parent e356301 commit a152525
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def sorted_glob(pattern):
if not video:
for name, pair in tqdm(zip(names, pairs), total=len(names)):
f_img, f_mask = pair
img, mask = map(cv2.imread, (f_img, f_mask))

img = cv2.imread(f_img) if f_img else None
mask = cv2.imread(f_mask) if f_mask else None
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

pred = predictor(img, mask)
Expand Down

0 comments on commit a152525

Please sign in to comment.