Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,9 +22,9 @@ det_config = 'configs/faster_rcnn_r50_fpn_1x_coco.py'
|
|
| 22 |
det_checkpoint = 'faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth'
|
| 23 |
|
| 24 |
# initialize pose model
|
| 25 |
-
pose_model = init_pose_model(pose_config, pose_checkpoint, device='
|
| 26 |
# initialize detector
|
| 27 |
-
det_model = init_detector(det_config, det_checkpoint, device='
|
| 28 |
|
| 29 |
def predict(img):
|
| 30 |
mmdet_results = inference_detector(det_model, img)
|
|
|
|
| 22 |
det_checkpoint = 'faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth'
|
| 23 |
|
| 24 |
# initialize pose model
|
| 25 |
+
pose_model = init_pose_model(pose_config, pose_checkpoint, device='cuda')
|
| 26 |
# initialize detector
|
| 27 |
+
det_model = init_detector(det_config, det_checkpoint, device='cuda')
|
| 28 |
|
| 29 |
def predict(img):
|
| 30 |
mmdet_results = inference_detector(det_model, img)
|