retinanet_R_50_FPN_1x.pkl
PyTorch RetinaNet
在线加载模型地址

确定自己使用的框架并导入对应的库。导入库实现样例代码可参考 文档中心-预训练模型使用教程

在代码中实现加载预训练模型地址

调用模型的实现方法

from detectron2.config import get_cfg

cfg = get_cfg()

cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/retinanet_R_50_FPN_1x.yaml"))

cfg.MODEL.WEIGHTS = model_path + 'retinanet_R_50_FPN_1x.pkl'