Spaces:
Runtime error
Runtime error
supersolar
commited on
Update infer.py
Browse files
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 =
|
128 |
# 修改为输出灰度图
|
129 |
-
|
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))
|