umuthopeyildirim commited on
Commit
e359066
1 Parent(s): e39f6fa

Fix color mapping issue in app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -103,8 +103,9 @@ with gr.Blocks(css=css) as demo:
103
  pred_depths_r_list[-1], pred_depths_r_list_flipped[-1])
104
  print("== Finished processing image")
105
  pred_depth = pred_depth.cpu().numpy().squeeze()
 
106
  output_image = cv2.applyColorMap(
107
- pred_depth, cv2.COLORMAP_INFERNO)[:, :, ::-1]
108
 
109
  # Continue with your file saving operations
110
  tmp = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
 
103
  pred_depths_r_list[-1], pred_depths_r_list_flipped[-1])
104
  print("== Finished processing image")
105
  pred_depth = pred_depth.cpu().numpy().squeeze()
106
+ pred_outpu_depth = pred_depth.cpu().numpy().astype(np.uint8)
107
  output_image = cv2.applyColorMap(
108
+ pred_outpu_depth, cv2.COLORMAP_INFERNO)[:, :, ::-1]
109
 
110
  # Continue with your file saving operations
111
  tmp = tempfile.NamedTemporaryFile(suffix='.png', delete=False)