hlydecker commited on
Commit
1263ab0
1 Parent(s): 82d85d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -30,10 +30,11 @@ 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
- predictor = DefaultPredictor(cfg)
34
 
35
  def segment_image(im):
36
 
 
 
37
  im = np.array(im)
38
  outputs = predictor(im)
39
  v = Visualizer(im[:, :, ::-1],
 
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)
40
  v = Visualizer(im[:, :, ::-1],