
人工智能深度学习计算机视觉【免费下载链接】PaddleDetectionObject Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.项目地址https://gitcode.com/gh_mirrors/pa/PaddleDetection点击查看免费下载FastDeploy 是 PaddleDetection 官方推荐的跨平台推理部署方案支持在 NVIDIA GPU、X86 CPU、飞腾 CPU、ARM CPU 以及 Intel GPU独立/集成显卡上快速部署目标检测与关键点检测模型。本文以仓库中 deploy/fastdeploy/cpu-gpu/README.md 为主线完整覆盖使用预导出模型快速体验 → 自行导出部署模型 → Python/C 部署示例 → 底层 Runtime 配置解析的全流程帮助你用一套统一的 API 把 PP-YOLOE、PicoDet、PP-TinyPose 等模型落地到 CPU/GPU 乃至 TensorRT 加速环境。1. 方案说明一套 FastDeploy多硬件覆盖PaddleDetection 借助 FastDeploy 实现检测模型的跨硬件部署原生支持的硬件包括NVIDIA GPU通过 Paddle Inference 后端或 TensorRT 加速X86 CPU如 Intel 系列处理器飞腾 CPU国产化场景ARM CPU嵌入式/边缘设备Intel GPU独立显卡/集成显卡FastDeploy 对模型系列做了统一的抽象PPYOLOE、PicoDet、PaddleYOLOX、PPYOLO、FasterRCNN、SSD、PaddleYOLOv5、PaddleYOLOv6、PaddleYOLOv7、RTMDet、CascadeRCNN、PSSDet、RetinaNet、PPYOLOESOD、FCOS、TTFNet、TOOD、GFL等所有类名的构造函数和预测函数在参数上完全一致。这意味着你只需要吃透一个模型的示例例如 PP-YOLOE即可举一反三调用全部模型这一设计贯穿 Python 与 C 两套接口。2. 快速上手使用预导出的模型列表为了方便开发者测试仓库提供了 PaddleDetection 导出的各系列推理模型.tgz压缩包解压后即包含model.pdmodel、model.pdiparams、infer_cfg.yml三个文件可直接下载运行。其中精度指标来源于 PaddleDetection 对各模型的官方介绍。2.1 目标检测及实例分割模型模型参数大小精度备注picodet_l_320_coco_lcnet23MBBox AP 42.6%ppyoloe_crn_l_300e_coco200MBBox AP 51.4%ppyoloe_plus_crn_m_80e_coco83.3MBBox AP 49.8%ppyolo_r50vd_dcn_1x_coco180MBBox AP 44.8%暂不支持TensorRTppyolov2_r101vd_dcn_365e_coco282MBBox AP 49.7%暂不支持TensorRTyolov3_darknet53_270e_coco237MBBox AP 39.1%yolox_s_300e_coco35MBBox AP 40.4%faster_rcnn_r50_vd_fpn_2x_coco160MBBox AP 40.8%暂不支持TensorRTmask_rcnn_r50_1x_coco128MBox AP 37.4%, Mask AP 32.8%暂不支持TensorRT、ORTssd_mobilenet_v1_300_120e_voc24.9MBox AP 73.8%暂不支持TensorRT、ORTssd_vgg16_300_240e_voc106.5MBox AP 77.8%暂不支持TensorRT、ORTssdlite_mobilenet_v1_300_coco29.1M暂不支持TensorRT、ORTrtmdet_l_300e_coco224MBox AP 51.2%rtmdet_s_300e_coco42MBox AP 44.5%yolov5_l_300e_coco183MBox AP 48.9%yolov5_s_300e_coco31MBox AP 37.6%yolov6_l_300e_coco229MBox AP 51.0%yolov6_s_400e_coco68MBox AP 43.4%yolov7_l_300e_coco145MBox AP 51.0%yolov7_x_300e_coco277MBox AP 53.0%cascade_rcnn_r50_fpn_1x_coco271MBox AP 41.1%暂不支持TensorRT、ORTcascade_rcnn_r50_vd_fpn_ssld_2x_coco271MBox AP 45.0%暂不支持TensorRT、ORTfaster_rcnn_enhance_3x_coco119MBox AP 41.5%暂不支持TensorRT、ORTfcos_r50_fpn_1x_coco129MBox AP 39.6%暂不支持TensorRTgfl_r50_fpn_1x_coco128MBox AP 41.0%暂不支持TensorRTppyoloe_crn_l_80e_sliced_visdrone_640_025200MBox AP 31.9%retinanet_r101_fpn_2x_coco210MBox AP 40.6%暂不支持TensorRT、ORTretinanet_r50_fpn_1x_coco136MBox AP 37.5%暂不支持TensorRT、ORTtood_r50_fpn_1x_coco130MBox AP 42.5%暂不支持TensorRT、ORTttfnet_darknet53_1x_coco178MBox AP 33.5%暂不支持TensorRT、ORTyolov8_x_500e_coco265MBox AP 53.8%yolov8_l_500e_coco173MBox AP 52.8%yolov8_m_500e_coco99MBox AP 50.2%yolov8_s_500e_coco43MBox AP 44.9%yolov8_n_500e_coco13MBox AP 37.3%从上表可以看出一个关键规律标注暂不支持 TensorRT、ORT的模型通常属于两阶段如 Faster/Mask/Cascade RCNN、RetinaNet或依赖特定后处理的检测器这些模型在导出与后端选择上需要额外注意详见第 3.3 节导出须知。2.2 关键点检测模型模型说明模型格式版本PP-TinyPose-128x96单人关键点检测模型PaddleRelease/2.5 configs/keypoint/tiny_posePP-TinyPose-256x192单人关键点检测模型PaddleRelease/2.5 configs/keypoint/tiny_posePicoDet-S-Lcnet-Pedestrian-192x192 PP-TinyPose-128x96单人关键点检测串联配置PaddleRelease/2.5 configs/keypoint/tiny_posePicoDet-S-Lcnet-Pedestrian-320x320 PP-TinyPose-256x192多人关键点检测串联配置PaddleRelease/2.5 configs/keypoint/tiny_posePP-TinyPose 的训练配置在当前仓库 configs/keypoint/tiny_pose 中即可找到tinypose_128x96.yml、tinypose_256x192.yml等说明这套部署方案与仓库内的关键点模型体系是完整打通的。注意串联配置意味着需要先跑检测模型PicoDet框出人体再对每个目标跑关键点模型这正是第 5.3 节 Pipeline 示例的内容。3. 自行导出 PaddleDetection 部署模型预导出模型仅覆盖固定配置实际项目中往往需要自行导出训练好的模型。3.1 模型版本与支持范围支持PaddleDetection ≥ 2.4 版本导出的模型部署。FastDeploy 已实测成功部署的模型系列包括PP-YOLOE含 PP-YOLOE系列PicoDet 系列PP-YOLO 系列含 v2YOLOv3 系列YOLOX 系列FasterRCNN 系列MaskRCNN 系列SSD 系列YOLOv5 / YOLOv6 / YOLOv7 / YOLOv8 系列来自 PaddleYOLO 仓库RTMDet 系列来自 PaddleYOLO 仓库CascadeRCNN 系列PSSDet 系列RetinaNet 系列PPYOLOESOD 系列FCOS 系列TTFNet 系列TOOD 系列GFL 系列PP-PicoDet PP-TinyPose 系列3.2 模型导出PaddleDetection 模型的导出流程请参考仓库文档 deploy/EXPORT_MODEL.md。导出工具位于 tools/export_model.py其命令行参数支持--output_dir输出目录默认output_inference与--for_fd标志。值得注意的是当前仓库的导出工具已内置了针对 FastDeploy 的适配export_model.py中的--for_fd参数会传入trainer.export(output_dir, for_fdFLAGS.for_fd)见 tools/export_model.py用于导出适配 FastDeploy 推理的模型格式。导出结果包含model.pdmodel、model.pdiparams和infer_cfg.yml三个文件其中 FastDeploy 会从infer_cfg.yml中读取模型推理时所需的预处理信息归一化、resize 等因此这三个文件缺一不可。3.3 导出须知自行导出推理模型时请务必注意以下三点不要在导出时去除 NMS正常导出即可FastDeploy 会在后处理阶段自行处理 NMS如果用于原生 TensorRT 后端非 Paddle Inference 后端不要添加--trt参数导出时不要添加fuse_normalizeTrue参数避免归一化算子被融合进模型导致 FastDeploy 读取infer_cfg.yml预处理信息时产生不一致。4. 部署环境准备在部署前需确认软硬件环境并下载对应平台的FastDeploy 预编译部署库预编译库下载与安装请参考 FastDeploy 官方安装文档区分 CPU 版与 GPU 版GPU 版额外包含 TensorRT 相关依赖本文示例要求FastDeploy 版本 ≥ 1.0.4部署模型可从第 2 节的预导出列表下载或按第 3 节自行导出。5. Python 部署示例Python 示例代码位于 deploy/fastdeploy/cpu-gpu/python核心脚本为 infer.py目标检测与pptinypose_infer.py关键点检测。5.1 目标检测CPU / GPU / Paddle-TensorRT以 Linux 为例完整执行流程如下# 下载部署示例代码 git clone https://github.com/PaddlePaddle/PaddleDetection.git cd PaddleDetection/deploy/fastdeploy/cpu-gpu/python # 注意如果当前分支找不到下面的fastdeploy测试代码请切换到develop分支 # git checkout develop # 下载PPYOLOE模型文件和测试图片 wget https://bj.bcebos.com/paddlehub/fastdeploy/ppyoloe_crn_l_300e_coco.tgz wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg tar xvf ppyoloe_crn_l_300e_coco.tgz # 运行部署示例 # CPU推理 python infer.py --model_dir ppyoloe_crn_l_300e_coco --image_file 000000014439.jpg --device cpu # GPU推理 python infer.py --model_dir ppyoloe_crn_l_300e_coco --image_file 000000014439.jpg --device gpu # GPU上Paddle-TensorRT推理注意TensorRT推理第一次运行有序列化模型的操作有一定耗时需要耐心等待 python infer.py --model_dir ppyoloe_crn_l_300e_coco --image_file 000000014439.jpg --device gpu --use_trt True运行完成后会在当前目录生成可视化结果visualized_result.jpg检测框置信度阈值默认为 0.5。5.2 部署示例选项说明参数含义默认值--model_dir指定模型文件夹所在的路径None--image_file指定测试图片所在的路径None--device指定即将运行的硬件类型支持的值为[cpu, gpu]当设置为 cpu 时可运行在 x86 cpu/arm cpu 等 cpu 上cpu--use_trt是否使用 trt该项只在 device 为 gpu 时有效False5.3 源码解析infer.py 的 Runtime 配置infer.py 中的build_option函数展示了三种推理模式如何映射到底层fd.RuntimeOptiondef build_option(args): option fd.RuntimeOption() if args.device.lower() gpu: option.use_gpu() if args.use_trt: option.use_paddle_infer_backend() # If use original Tensorrt, not Paddle-TensorRT, # please try option.use_trt_backend() option.paddle_infer_option.enable_trt True option.paddle_infer_option.collect_trt_shape True option.trt_option.set_shape(image, [1, 3, 640, 640], [1, 3, 640, 640], [1, 3, 640, 640]) option.trt_option.set_shape(scale_factor, [1, 2], [1, 2], [1, 2]) return option几点底层细节默认走 Paddle Inference 后端不设置任何选项时在 CPU 上推理use_gpu()后切换为 GPU 上的 Paddle Inferenceuse_trtTrue默认启用的是 Paddle-TensorRT即 Paddle Inference 内部的 TensorRT 加速若想使用原生 TensorRT 后端改用option.use_trt_backend()动态 shape 设置set_shape的签名是(输入名, 最小shape, 最优shape, 最大shape)。PP-YOLOE 需要为image[1,3,640,640]与scale_factor[1,2]设置 shape这与模型导出时infer_cfg.yml记录的输入信息一致模型加载时按model.pdmodel、model.pdiparams、infer_cfg.yml三个文件拼接路径见 infer.py随后一行fd.vision.detection.PPYOLOE(model_file, params_file, config_file, runtime_optionruntime_option)即可完成初始化与model.predict(im)推理。5.4 关键点检测示例PP-TinyPose 单模型独立部署使用pptinypose_infer.py# 下载PP-TinyPose模型文件和测试图片 wget https://bj.bcebos.com/paddlehub/fastdeploy/PP_TinyPose_256x192_infer.tgz tar -xvf PP_TinyPose_256x192_infer.tgz wget https://bj.bcebos.com/paddlehub/fastdeploy/hrnet_demo.jpg # CPU推理 python pptinypose_infer.py --model_dir PP_TinyPose_256x192_infer --image_file hrnet_demo.jpg --device cpu # GPU推理 python pptinypose_infer.py --model_dir PP_TinyPose_256x192_infer --image_file hrnet_demo.jpg --device gpu # GPU上Paddle-TensorRT推理 python pptinypose_infer.py --model_dir PP_TinyPose_256x192_infer --image_file hrnet_demo.jpg --device gpu --use_trt True5.5 多人关键点检测Pipeline 串联多人关键点检测需要先检测、后关键点的串联流程示例位于 deploy/fastdeploy/cpu-gpu/python/det_keypoint_unitecd PaddleDetection/deploy/fastdeploy/cpu-gpu/python/det_keypoint_unite # 下载模型与测试图片 wget https://bj.bcebos.com/paddlehub/fastdeploy/PP_TinyPose_256x192_infer.tgz tar -xvf PP_TinyPose_256x192_infer.tgz wget https://bj.bcebos.com/paddlehub/fastdeploy/PP_PicoDet_V2_S_Pedestrian_320x320_infer.tgz tar -xvf PP_PicoDet_V2_S_Pedestrian_320x320_infer.tgz wget https://bj.bcebos.com/paddlehub/fastdeploy/000000018491.jpg # CPU推理 python det_keypoint_unite_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --det_model_dir PP_PicoDet_V2_S_Pedestrian_320x320_infer --image_file 000000018491.jpg --device cpu # GPU推理 python det_keypoint_unite_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --det_model_dir PP_PicoDet_V2_S_Pedestrian_320x320_infer --image_file 000000018491.jpg --device gpu # GPU上Paddle-TensorRT推理 python det_keypoint_unite_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --det_model_dir PP_PicoDet_V2_S_Pedestrian_320x320_infer --image_file 000000018491.jpg --device gpu --use_trt TruePipeline 参数说明参数含义默认值--tinypose_model_dir指定关键点模型文件夹所在的路径None--det_model_dir指定目标检测模型文件夹所在的路径None--image_file指定测试图片所在的路径None--device指定即将运行的硬件类型支持的值为[cpu, gpu]cpu--use_trt是否使用 trt该项只在 device 为 gpu 时有效False从源码 det_keypoint_unite_infer.py 可以看到串联的关键实现两个模型各自用fd.RuntimeOption()独立配置PicoDet 输入为 320×320PP-TinyPose 输入为 256×192TRT shape 需分别设置然后通过fd.pipeline.PPTinyPose(det_model, tinypose_model)组合成 Pipeline并通过pipeline.detection_model_score_threshold 0.5控制检测置信度阈值最终用fd.vision.vis_keypoint_detection以conf_threshold0.2可视化关键点。5.6 Python 接口总览所有检测/分割模型共用同一构造函数签名fastdeploy.vision.detection.PPYOLOE(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.PicoDet(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.PaddleYOLOX(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.YOLOv3(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.PPYOLO(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.FasterRCNN(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.MaskRCNN(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.SSD(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.PaddleYOLOv5(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.PaddleYOLOv6(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.PaddleYOLOv7(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.RTMDet(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.CascadeRCNN(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.PSSDet(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.RetinaNet(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.PPYOLOESOD(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.FCOS(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.TTFNet(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.TOOD(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE) fastdeploy.vision.detection.GFL(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE)关键点检测模型接口fd.vision.keypointdetection.PPTinyPose(model_file, params_file, config_file, runtime_optionNone, model_formatModelFormat.PADDLE)其中model_file、params_file为导出的 Paddle 部署模型文件config_file为 PaddleDetection 同时导出的部署配置infer_cfg.yml。6. C 部署示例C 示例代码位于 deploy/fastdeploy/cpu-gpu/cpp适用于对性能敏感或需要嵌入现有 C 服务框架的场景。6.1 编译与运行# 下载FastDeploy预编译库用户可在上文提到的FastDeploy预编译库中自行选择合适的版本使用 wget https://bj.bcebos.com/fastdeploy/release/cpp/fastdeploy-linux-x64-gpu-x.x.x.tgz tar xvf fastdeploy-linux-x64-gpu-x.x.x.tgz # 下载部署示例代码 git clone https://github.com/PaddlePaddle/PaddleDetection.git cd PaddleDetection/deploy/fastdeploy/cpu-gpu/cpp # 注意如果当前分支找不到下面的fastdeploy测试代码请切换到develop分支 # git checkout develop # 编译部署示例 mkdir build cd build mv ../fastdeploy-linux-x64-gpu-x.x.x . cmake .. -DFASTDEPLOY_INSTALL_DIR${PWD}/fastdeploy-linux-x64-gpu-x.x.x make -j # 下载PPYOLOE模型文件和测试图片 wget https://bj.bcebos.com/paddlehub/fastdeploy/ppyoloe_crn_l_300e_coco.tgz wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg tar xvf ppyoloe_crn_l_300e_coco.tgz # 运行部署示例 # CPU推理 ./infer_demo ./ppyoloe_crn_l_300e_coco 000000014439.jpg 0 # GPU推理 ./infer_demo ./ppyoloe_crn_l_300e_coco 000000014439.jpg 1 # GPU上Paddle-TensorRT推理注意TensorRT推理第一次运行有序列化模型的操作有一定耗时需要耐心等待 ./infer_demo ./ppyoloe_crn_l_300e_coco 000000014439.jpg 2运行参数run_option为整数0表示 CPU 推理1表示 GPU 推理2表示 GPU TensorRT。以上命令适用于 Linux/MacOSWindows 下 SDK 的使用方式请参考 FastDeploy 官方 FAQ如何在 Windows 中使用 FastDeploy C SDK。编译配置由 deploy/fastdeploy/cpu-gpu/cpp/CMakeLists.txt 完成通过-DFASTDEPLOY_INSTALL_DIR指定预编译库路径include(${FASTDEPLOY_INSTALL_DIR}/FastDeploy.cmake)引入 SDK 配置并分别编译出infer_demo目标检测与infer_tinypose_demo关键点检测两个可执行文件。6.2 源码解析infer.cc 的三种推理模式infer.cc 中三个函数分别对应三种模式核心差异仅在RuntimeOption配置// CPU: 默认 RuntimeOption UseCpu() auto option fastdeploy::RuntimeOption(); option.UseCpu(); // GPU: UseGpu() auto option fastdeploy::RuntimeOption(); option.UseGpu(); // GPU Paddle-TensorRT auto option fastdeploy::RuntimeOption(); option.UseGpu(); option.UsePaddleInferBackend(); // If use original Tensorrt, not Paddle-TensorRT, // please try option.UseTrtBackend() option.paddle_infer_option.enable_trt true; option.paddle_infer_option.collect_trt_shape true; option.trt_option.SetShape(image, {1, 3, 640, 640}, {1, 3, 640, 640}, {1, 3, 640, 640}); option.trt_option.SetShape(scale_factor, {1, 2}, {1, 2}, {1, 2});与 Python 版完全对应C 侧同样通过UsePaddleInferBackend()enable_trt走 Paddle-TensorRT若要原生 TensorRT 后端则改用UseTrtBackend()。统一的推理流程为拼接三个模型文件路径 → 构造模型对象 → 检查model.Initialized()→model.Predict(im, res)→fastdeploy::vision::VisDetection(im, res, 0.5)可视化保存为vis_result.jpg。6.3 C 接口总览fastdeploy::vision::detection::PicoDet(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::SOLOv2(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PPYOLOE(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PPYOLO(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::YOLOv3(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PaddleYOLOX(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::FasterRCNN(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::MaskRCNN(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::SSD(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PaddleYOLOv5(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PaddleYOLOv6(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PaddleYOLOv7(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PaddleYOLOv8(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::CascadeRCNN(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PSSDet(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::RetinaNet(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::PPYOLOESOD(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::FCOS(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::TOOD(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); fastdeploy::vision::detection::GFL(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE);关键点检测与多人 Pipeline 接口fastdeploy::vision::keypointdetection::PPTinyPose(const string model_file, const string params_file, const string config_file, const RuntimeOption runtime_option RuntimeOption(), const ModelFormat model_format ModelFormat::PADDLE); // 多人关键点检测串联见 det_keypoint_unite 示例 fastdeploy::pipeline::PPTinyPose( fastdeploy::vision::detection::PicoDet* det_model, fastdeploy::vision::keypointdetection::PPTinyPose* pptinypose_model)C 侧的多人串联示例位于 deploy/fastdeploy/cpu-gpu/cpp/det_keypoint_unite运行命令格式为./infer_demo det_model_dir tinypose_model_dir image_file 0|1|2。7. 常见问题与更多指南如何切换模型推理后端引擎FastDeploy 支持在 Paddle Inference、ONNX Runtime、TensorRT 等后端间切换需根据硬件与模型特点选择如第 2 节表格中标注暂不支持 TensorRT、ORT的模型应避免使用相应后端Intel GPU独立/集成显卡的使用Intel GPU 部署有独立的硬件适配教程涉及 opencl/oneAPI 环境配置编译 CPU 部署库 / GPU 部署库 / Jetson 部署库如需从源码定制部署库可分别参考 FastDeploy 官方对应的编译文档更多仓库内资源FastDeploy 部署 PaddleDetection 模型概览模型导出完整指南Python 部署示例C 部署示例8. 小结基于 FastDeploy 的 CPU/GPU 部署方案核心可以概括为三条主线统一的模型接口20 余个模型系列共用一套构造函数与 predict 流程、统一的运行时配置RuntimeOption一参切换 CPU/GPU/Paddle-TensorRT、统一的模型产物model.pdmodelmodel.pdiparamsinfer_cfg.yml三件套。掌握 PP-YOLOE 一个示例即可将 PaddleDetection 的绝大多数检测、分割与关键点模型快速部署到目标硬件这也是该方案在工程落地中的最大价值所在。赞分享人工智能深度学习计算机视觉【免费下载链接】PaddleDetectionObject Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.项目地址https://gitcode.com/gh_mirrors/pa/PaddleDetection点击查看免费下载相关推荐PaddleDetection 服务化部署基于 FastDeploy Serving 的完整实操指南PaddleDetection 服务化部署基于 FastDeploy Serving 的完整实操指南 本文以 PP YOLOE 模型 ppyoloe_crn人工智能深度学习计算机视觉PaddleDetection 基于 FastDeploy 的 CPU/GPU Python 部署指南PP-YOLOE 目标检测与 PP-TinyPose 关键点检测实战PaddleDetection 基于 FastDeploy 的 CPU/GPU Python 部署指南PP YOLOE 目标检测与 PP TinyPose 关人工智能深度学习计算机视觉PaddleDetection 基于 RKNPU2 的 C 端侧部署实战以 PPYOLOE 为例FastDeployPaddleDetection 基于 RKNPU2 的 C 端侧部署实战以 PPYOLOE 为例FastDeploy PaddleDetection人工智能深度学习计算机视觉创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考