guangkaixu commited on
Commit
1cceacf
·
verified ·
1 Parent(s): 3bdd6a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -67,8 +67,8 @@ def process_image(
67
  print(f"Processing image {name_base}{name_ext}")
68
 
69
  path_output_dir = tempfile.mkdtemp()
70
- path_out_fp32 = os.path.join(path_output_dir, f"{name_base}_depth_fp32.npy")
71
- path_out_vis = os.path.join(path_output_dir, f"{name_base}_depth_colored.png")
72
 
73
  input_image = Image.open(path_input)
74
 
@@ -87,7 +87,7 @@ def process_image(
87
  depth_colored.save(path_out_vis)
88
 
89
  if mode == 'depth':
90
- path_out_16bit = os.path.join(path_output_dir, f"{name_base}_depth_16bit.png")
91
  depth_16bit = (depth_pred * 65535.0).astype(np.uint16)
92
  Image.fromarray(depth_16bit).save(path_out_16bit, mode="I;16")
93
  else:
 
67
  print(f"Processing image {name_base}{name_ext}")
68
 
69
  path_output_dir = tempfile.mkdtemp()
70
+ path_out_fp32 = os.path.join(path_output_dir, f"{name_base}_%s_fp32.npy" %mode)
71
+ path_out_vis = os.path.join(path_output_dir, f"{name_base}_%s_colored.png" %mode)
72
 
73
  input_image = Image.open(path_input)
74
 
 
87
  depth_colored.save(path_out_vis)
88
 
89
  if mode == 'depth':
90
+ path_out_16bit = os.path.join(path_output_dir, f"{name_base}_%s_16bit.png" %mode)
91
  depth_16bit = (depth_pred * 65535.0).astype(np.uint16)
92
  Image.fromarray(depth_16bit).save(path_out_16bit, mode="I;16")
93
  else: