首页 > 其他分享 >PVT2

PVT2

时间:2023-03-08 17:46:36浏览次数:32  
标签:PVT2 faster 1x fpn file rcnn r50

from mmdet.apis import init_detector, inference_detector

config_file = 'configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py'
# download the checkpoint from model zoo and put it in `checkpoints/`
# url: http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
checkpoint_file = 'checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth'
device = 'cuda:0'
# init a detector
model = init_detector(config_file, checkpoint_file, device=device)
# inference the demo image
inference_detector(model, 'demo/demo.jpg')

标签:PVT2,faster,1x,fpn,file,rcnn,r50
From: https://www.cnblogs.com/Crown-V/p/17195482.html

相关文章