Spaces:
Runtime error
Runtime error
Update backend.py
Browse files- backend.py +2 -2
backend.py
CHANGED
@@ -30,9 +30,9 @@ from detectron2.structures import Instances
|
|
30 |
|
31 |
# Model for trees
|
32 |
tree_cfg = get_cfg()
|
33 |
-
tree_cfg.merge_from_file("tree_model_weights/
|
34 |
tree_cfg.MODEL.DEVICE='cpu'
|
35 |
-
tree_cfg.MODEL.WEIGHTS = "tree_model_weights/
|
36 |
tree_cfg.MODEL.ROI_HEADS.NUM_CLASSES = 2
|
37 |
tree_predictor = DefaultPredictor(tree_cfg)
|
38 |
|
|
|
30 |
|
31 |
# Model for trees
|
32 |
tree_cfg = get_cfg()
|
33 |
+
tree_cfg.merge_from_file("tree_model_weights/tree_v2_cfg.yml")
|
34 |
tree_cfg.MODEL.DEVICE='cpu'
|
35 |
+
tree_cfg.MODEL.WEIGHTS = "tree_model_weights/treev2_best.pth"
|
36 |
tree_cfg.MODEL.ROI_HEADS.NUM_CLASSES = 2
|
37 |
tree_predictor = DefaultPredictor(tree_cfg)
|
38 |
|