plutosss commited on
Commit
ab2eb7e
·
verified ·
1 Parent(s): cbc569c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -58,15 +58,19 @@ def teed_process_image(image):
58
  args.input_val_dir = './teed_tmp'
59
  args.output_dir = './output/teed_imgs'
60
 
61
- print(args) # 调试信息
62
- print(train_info) # 调试信息
 
 
 
63
 
64
- main(args, train_info) # 确保调用正确
65
 
66
  shutil.rmtree('./teed_tmp')
67
  return cv2.imread(os.path.join('./output/teed_imgs', 'processed_image.png'))
68
 
69
 
 
70
  # 处理单个图像
71
  def process_single_image(image):
72
  depth_result = depth_anything_image(image, 'vitl')
 
58
  args.input_val_dir = './teed_tmp'
59
  args.output_dir = './output/teed_imgs'
60
 
61
+ checkpoint_path = './output/teed_imgs/BIPED/5/5_model.pth'
62
+ if not os.path.exists(checkpoint_path):
63
+ raise FileNotFoundError(f"Checkpoint file not found: {checkpoint_path}")
64
+
65
+ args.checkpoint_data = checkpoint_path # 确保使用正确的路径
66
 
67
+ main(args, train_info)
68
 
69
  shutil.rmtree('./teed_tmp')
70
  return cv2.imread(os.path.join('./output/teed_imgs', 'processed_image.png'))
71
 
72
 
73
+
74
  # 处理单个图像
75
  def process_single_image(image):
76
  depth_result = depth_anything_image(image, 'vitl')