地址链接:https://www.flyai.com/m/retinanet_R_50_FPN_1x.pkl
查看来源:https://github.com/facebookresearch/detectron2/blob/master/MODEL_ZOO.md
确定自己使用的框架并导入对应的库。导入库实现样例代码可参考 文档中心-预训练模型使用教程
在代码中实现加载预训练模型地址
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'