kxqt commited on
Commit
de52eea
1 Parent(s): 6837ba9
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,11 +22,11 @@ hourglass_args = {
22
  },
23
  }
24
 
25
- def predict(image, speed_mode, point_per_side):
26
  mask_generator = SamAutomaticMaskGenerator(
27
  build_sam(checkpoint="sam_vit_h_4b8939.pth", hourglass_kwargs=hourglass_args[speed_mode]),
28
- point_per_side=point_per_side,
29
- points_per_batch=64 if point_per_side > 12 else point_per_side * point_per_side
30
  )
31
  masks = mask_generator.generate(image)
32
 
 
22
  },
23
  }
24
 
25
+ def predict(image, speed_mode, points_per_side):
26
  mask_generator = SamAutomaticMaskGenerator(
27
  build_sam(checkpoint="sam_vit_h_4b8939.pth", hourglass_kwargs=hourglass_args[speed_mode]),
28
+ points_per_side=points_per_side,
29
+ points_per_batch=64 if points_per_side > 12 else points_per_side * points_per_side
30
  )
31
  masks = mask_generator.generate(image)
32