ZhengPeng7 commited on
Commit
82441e5
·
verified ·
1 Parent(s): 8a9ec25

Change RGB to BGR in cv2.imwrite.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -126,7 +126,7 @@ def predict(images, resolution, weights_file):
126
 
127
  if tab_is_batch:
128
  save_file_path = os.path.join(save_dir, "{}.png".format(os.path.splitext(os.path.basename(image_src))[0]))
129
- cv2.imwrite(save_file_path, image_masked)
130
  save_paths.append(save_file_path)
131
 
132
  if tab_is_batch:
 
126
 
127
  if tab_is_batch:
128
  save_file_path = os.path.join(save_dir, "{}.png".format(os.path.splitext(os.path.basename(image_src))[0]))
129
+ cv2.imwrite(save_file_path, cv2.cvtColor(image_masked, cv2.COLOR_RGB2BGR))
130
  save_paths.append(save_file_path)
131
 
132
  if tab_is_batch: