guangkaixu commited on
Commit
a02b691
1 Parent(s): 704db5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -76,7 +76,7 @@ def process_depth(
76
  processing_res=processing_res,
77
  batch_size=1 if processing_res == 0 else 0,
78
  show_progress_bar=False,
79
- mode=mode,
80
  )
81
 
82
  depth_pred = pipe_out.pred_np
@@ -85,7 +85,7 @@ def process_depth(
85
  np.save(path_out_fp32, depth_pred)
86
  depth_colored.save(path_out_vis)
87
 
88
- path_out_16bit = os.path.join(path_output_dir, f"{name_base}_%s_16bit.png" %mode)
89
  depth_16bit = (depth_pred * 65535.0).astype(np.uint16)
90
  Image.fromarray(depth_16bit).save(path_out_16bit, mode="I;16")
91
 
@@ -113,7 +113,7 @@ def process_normal(
113
  processing_res=processing_res,
114
  batch_size=1 if processing_res == 0 else 0,
115
  show_progress_bar=False,
116
- mode=mode,
117
  )
118
 
119
  depth_pred = pipe_out.pred_np
@@ -148,7 +148,7 @@ def process_dis(
148
  processing_res=processing_res,
149
  batch_size=1 if processing_res == 0 else 0,
150
  show_progress_bar=False,
151
- mode=mode,
152
  )
153
 
154
  depth_pred = pipe_out.pred_np
 
76
  processing_res=processing_res,
77
  batch_size=1 if processing_res == 0 else 0,
78
  show_progress_bar=False,
79
+ mode='depth',
80
  )
81
 
82
  depth_pred = pipe_out.pred_np
 
85
  np.save(path_out_fp32, depth_pred)
86
  depth_colored.save(path_out_vis)
87
 
88
+ path_out_16bit = os.path.join(path_output_dir, f"{name_base}_depth_16bit.png")
89
  depth_16bit = (depth_pred * 65535.0).astype(np.uint16)
90
  Image.fromarray(depth_16bit).save(path_out_16bit, mode="I;16")
91
 
 
113
  processing_res=processing_res,
114
  batch_size=1 if processing_res == 0 else 0,
115
  show_progress_bar=False,
116
+ mode='normal',
117
  )
118
 
119
  depth_pred = pipe_out.pred_np
 
148
  processing_res=processing_res,
149
  batch_size=1 if processing_res == 0 else 0,
150
  show_progress_bar=False,
151
+ mode='seg',
152
  )
153
 
154
  depth_pred = pipe_out.pred_np