Spaces:
Sleeping
Sleeping
Update app4.py
Browse files
app4.py
CHANGED
|
@@ -25,7 +25,7 @@ det_cfg = get_cfg()
|
|
| 25 |
det_cfg.merge_from_file(
|
| 26 |
model_zoo.get_config_file("COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml")
|
| 27 |
)
|
| 28 |
-
det_cfg.MODEL.WEIGHTS = "/app/
|
| 29 |
det_cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5
|
| 30 |
det_cfg.MODEL.DEVICE = "cpu"
|
| 31 |
det_cfg.MODEL.ROI_HEADS.NUM_CLASSES = 1
|
|
|
|
| 25 |
det_cfg.merge_from_file(
|
| 26 |
model_zoo.get_config_file("COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml")
|
| 27 |
)
|
| 28 |
+
det_cfg.MODEL.WEIGHTS = "/app/model_final2.pth" # your trained weights
|
| 29 |
det_cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5
|
| 30 |
det_cfg.MODEL.DEVICE = "cpu"
|
| 31 |
det_cfg.MODEL.ROI_HEADS.NUM_CLASSES = 1
|