Evan73 commited on
Commit
52bfb2b
·
1 Parent(s): f7928d3
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -2,6 +2,9 @@ import gradio as gr
2
  from sam2segment_structure import generate_trigger_crop
3
  import os
4
 
 
 
 
5
  # 模拟 lane_data(后期你可以动态读取 JSON 或用户上传)
6
  dummy_lane_data = {
7
  "lanes": [[-2, -2, -2, 814, 751, 688, 625, 562, 500, 438, 373, 305, 234, 160, 88, 16, -64, -2, -2, -2]],
 
2
  from sam2segment_structure import generate_trigger_crop
3
  import os
4
 
5
+ if not os.path.exists("sam2"):
6
+ os.system("git clone https://github.com/facebookresearch/sam2.git") # 修改为你的 sam2 仓库地址
7
+
8
  # 模拟 lane_data(后期你可以动态读取 JSON 或用户上传)
9
  dummy_lane_data = {
10
  "lanes": [[-2, -2, -2, 814, 751, 688, 625, 562, 500, 438, 373, 305, 234, 160, 88, 16, -64, -2, -2, -2]],