Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
| 24 |
def setup_model():
|
| 25 |
cfg = get_cfg()
|
| 26 |
cfg.MODEL.DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
| 27 |
-
cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml")
|
| 28 |
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml")
|
| 29 |
|
| 30 |
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # Set a threshold for this model
|
|
|
|
| 24 |
def setup_model():
|
| 25 |
cfg = get_cfg()
|
| 26 |
cfg.MODEL.DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
| 27 |
+
cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml"))
|
| 28 |
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml")
|
| 29 |
|
| 30 |
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # Set a threshold for this model
|