zzzzzeee commited on
Commit
0699fc7
·
verified ·
1 Parent(s): dac3b55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -58,10 +58,10 @@ def compute_motion_map(spike, tau_f, tau_s, U_c, theta, sampling_rate=40000):
58
  # 取中心时间步的运动掩码
59
  central_index = T // 2
60
  motion_map = motion_masks[central_index]
61
- print("ret")
62
  # 转换为图像格式 (0-255)
63
  motion_map = (motion_map * 255).astype(np.uint8)
64
- print("returning")
65
  return motion_map
66
 
67
  # Gradio 接口
@@ -114,7 +114,7 @@ with gr.Blocks() as demo:
114
  spike = load_vidar_dat(dat_path, width=400, height=250)
115
  # 计算运动图
116
  motion_map = compute_motion_map(spike, tau_f, tau_s, U_c, theta)
117
- print("rett")
118
  # 转换为 PIL 图像以供 Gradio 使用
119
  return Image.fromarray(motion_map)
120
 
 
58
  # 取中心时间步的运动掩码
59
  central_index = T // 2
60
  motion_map = motion_masks[central_index]
61
+ print(motion_map.min(), motion_map.max())
62
  # 转换为图像格式 (0-255)
63
  motion_map = (motion_map * 255).astype(np.uint8)
64
+
65
  return motion_map
66
 
67
  # Gradio 接口
 
114
  spike = load_vidar_dat(dat_path, width=400, height=250)
115
  # 计算运动图
116
  motion_map = compute_motion_map(spike, tau_f, tau_s, U_c, theta)
117
+
118
  # 转换为 PIL 图像以供 Gradio 使用
119
  return Image.fromarray(motion_map)
120