supersolar commited on
Commit
3b80096
·
verified ·
1 Parent(s): 7c9838f

Update infer.py

Browse files
Files changed (1) hide show
  1. infer.py +2 -2
infer.py CHANGED
@@ -124,9 +124,9 @@ def lotus_video(input_video, task_name, seed, device):
124
  ).images[0]
125
  # Post-process the prediction
126
  if task_name == 'depth':
127
- output_npy = pred.mean(axis=-1)
128
  # 修改为输出灰度图
129
- output_color = Image.fromarray((output_npy * 255).astype(np.uint8), mode='L')
130
  else:
131
  output_npy_g = pred_g
132
  output_color_g = Image.fromarray((output_npy_g * 255).astype(np.uint8))
 
124
  ).images[0]
125
  # Post-process the prediction
126
  if task_name == 'depth':
127
+ output_npy = pred_g.mean(axis=-1)
128
  # 修改为输出灰度图
129
+ output_color_g = Image.fromarray((output_npy * 255).astype(np.uint8), mode='L')
130
  else:
131
  output_npy_g = pred_g
132
  output_color_g = Image.fromarray((output_npy_g * 255).astype(np.uint8))