LPX55 commited on
Commit
4ea7fe3
·
verified ·
1 Parent(s): b60a396

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -123,7 +123,12 @@ def sam_process(input_image, checkpoint, tracking_points, trackings_input_label,
123
  # sam2_checkpoint, model_cfg = checkpoint_map[checkpoint]
124
  # Use CPU for both model and computations
125
  # sam2_model = build_sam2(model_cfg, sam2_checkpoint, device="cpu")
126
- predictor = SAM2ImagePredictor.from_pretrained(sam21_hfmap[checkpoint], device="cpu")
 
 
 
 
 
127
 
128
  # predictor = SAM2ImagePredictor(sam2_model)
129
  predictor.set_image(image)
 
123
  # sam2_checkpoint, model_cfg = checkpoint_map[checkpoint]
124
  # Use CPU for both model and computations
125
  # sam2_model = build_sam2(model_cfg, sam2_checkpoint, device="cpu")
126
+ predictor = SAM2ImagePredictor.from_pretrained(
127
+ sam21_hfmap[checkpoint],
128
+ device="cpu",
129
+ max_hole_area=0.0,
130
+ max_sprinkle_area=0.0,
131
+ )
132
 
133
  # predictor = SAM2ImagePredictor(sam2_model)
134
  predictor.set_image(image)