hlydecker commited on
Commit
93804b2
1 Parent(s): 1263ab0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -27,13 +27,12 @@ from detectron2.checkpoint import DetectionCheckpointer
27
  cfg = get_cfg()
28
  cfg.merge_from_file("model_weights/treev1_cfg.yaml")
29
  cfg.MODEL.DEVICE='cpu'
30
- cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.75
31
  cfg.MODEL.WEIGHTS = "model_weights/treev1_best.pth"
32
  cfg.MODEL.ROI_HEADS.NUM_CLASSES = 2
33
 
34
  def segment_image(im):
35
 
36
- cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.75
37
  predictor = DefaultPredictor(cfg)
38
  im = np.array(im)
39
  outputs = predictor(im)
 
27
  cfg = get_cfg()
28
  cfg.merge_from_file("model_weights/treev1_cfg.yaml")
29
  cfg.MODEL.DEVICE='cpu'
 
30
  cfg.MODEL.WEIGHTS = "model_weights/treev1_best.pth"
31
  cfg.MODEL.ROI_HEADS.NUM_CLASSES = 2
32
 
33
  def segment_image(im):
34
 
35
+ cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.25
36
  predictor = DefaultPredictor(cfg)
37
  im = np.array(im)
38
  outputs = predictor(im)