Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
|
@@ -34,10 +34,10 @@ model_name='./configs/COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yam
|
|
| 34 |
|
| 35 |
cfg = get_cfg()
|
| 36 |
# add project-specific config (e.g., TensorMask) here if you're not running a model in detectron2's core library
|
| 37 |
-
cfg.merge_from_file(
|
| 38 |
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # set threshold for this model
|
| 39 |
# Find a model from detectron2's model zoo. You can use the https://dl.fbaipublicfiles... url as w ell
|
| 40 |
-
cfg.MODEL.WEIGHTS =
|
| 41 |
|
| 42 |
if not torch.cuda.is_available():
|
| 43 |
cfg.MODEL.DEVICE='cpu'
|
|
|
|
| 34 |
|
| 35 |
cfg = get_cfg()
|
| 36 |
# add project-specific config (e.g., TensorMask) here if you're not running a model in detectron2's core library
|
| 37 |
+
cfg.merge_from_file(model_name)
|
| 38 |
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # set threshold for this model
|
| 39 |
# Find a model from detectron2's model zoo. You can use the https://dl.fbaipublicfiles... url as w ell
|
| 40 |
+
cfg.MODEL.WEIGHTS = './output_3x_transfiner_r50.pth'
|
| 41 |
|
| 42 |
if not torch.cuda.is_available():
|
| 43 |
cfg.MODEL.DEVICE='cpu'
|