2022-08-15 13:41:21 +00:00
2022-08-15 13:41:21 +00:00
2022-08-12 20:22:11 +08:00
2022-07-05 09:30:15 +00:00
2022-07-05 09:30:15 +00:00
2022-07-05 09:30:15 +00:00
2022-07-05 09:30:15 +00:00
2022-07-05 09:30:15 +00:00
2022-08-15 13:28:48 +08:00
2022-06-27 18:23:21 +08:00
2022-08-12 21:59:04 +08:00

FastDeploy


FastDeploy是一款简单易用的推理部署工具箱。覆盖业界主流优质预训练模型并提供开箱即用的开发体验,包括图像分类、目标检测、图像分割、人脸检测、人体关键点识别、文字识别等多任务,满足开发者多场景多硬件多平台的快速部署需求。

发版历史

  • [v0.2.0] 2022.08.18 全面开源服务端部署代码支持40+视觉模型在CPU/GPU以及通过GPU TensorRT加速部署

服务端模型

任务场景 模型 CPU NVIDIA GPU TensorRT
图像分类 PaddleClas/ResNet50
PaddleClas/PPLCNet
PaddleClas/EfficientNet
PaddleClas/GhostNet
PaddleClas/MobileNetV1
PaddleClas/MobileNetV2
PaddleClas/ShuffleNetV2
目标检测 PaddleDetection/PPYOLOE
PaddleDetection/PicoDet
PaddleDetection/YOLOX
PaddleDetection/YOLOv3
PaddleDetection/PPYOLO -
PaddleDetection/PPYOLOv2 -
PaddleDetection/FasterRCNN -
WongKinYiu/YOLOv7

快速开始

安装FastDeploy Python

用户根据开发环境选择安装版本,更多安装环境参考安装文档.

pip install https://bj.bcebos.com/paddlehub/fastdeploy/wheels/fastdeploy_python-0.2.0-cp38-cp38-manylinux1_x86_64.whl

准备目标检测模型和测试图片

wget https://bj.bcebos.com/paddlehub/fastdeploy/ppyoloe_crn_l_300e_coco.tgz
tar xvf ppyoloe_crn_l_300e_coco.tgz
wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg

加载模型预测

import fastdeploy.vision as vis
import cv2

model = vis.detection.PPYOLOE("ppyoloe_crn_l_300e_coco/model.pdmodel",
                              "ppyoloe_crn_l_300e_coco/model.pdiparams",
                              "ppyoloe_crn_l_300e_coco/infer_cfg.yml")

im = cv2.imread("000000014439.jpg")
result = model.predict(im.copy())
print(result)

vis_im = fd.vision.vis_detection(im, result, score_threshold=0.5)
cv2.imwrite("vis_image.jpg", vis_im)

预测完成,可视化结果保存至vis_image.jpg,同时输出检测结果如下

DetectionResult: [xmin, ymin, xmax, ymax, score, label_id]
415.047363,89.311523, 506.009613, 283.863129, 0.950423, 0
163.665710,81.914894, 198.585342, 166.760880, 0.896433, 0
581.788635,113.027596, 612.623474, 198.521713, 0.842597, 0
267.217224,89.777321, 298.796051, 169.361496, 0.837951, 0
104.465599,45.482410, 127.688835, 93.533875, 0.773348, 0
...

更多服务端部署示例

FastDeploy提供了大量部署示例供开发者参考支持模型在CPU、GPU以及TensorRT的部署

📱轻量化SDK快速实现端侧AI推理部署

任务场景 模型 大小(MB) 边缘端 移动端 移动端
---- --- --- Linux Android iOS
----- ---- --- ARM CPU ARM CPU ARM CPU
Classfication PP-LCNet 11.9
PP-LCNetv2 26.6
EfficientNet 31.4
GhostNet 20.8
MobileNetV1 17
MobileNetV2 14.2
MobileNetV3 22
ShuffleNetV2 9.2
SqueezeNetV1.1 5
Inceptionv3 95.5
PP-HGNet 59
SwinTransformer_224_win7 352.7
Detection PP-PicoDet_s_320_coco 4.1
PP-PicoDet_s_320_lcnet 4.9
CenterNet 4.8
YOLOv3_MobileNetV3 94.6
PP-YOLO_tiny_650e_coco 4.4
SSD_MobileNetV1_300_120e_voc 23.3
PP-YOLO_ResNet50vd 188.5
PP-YOLOv2_ResNet50vd 218.7
PP-YOLO_crn_l_300e_coco 209.1
YOLOv5s 29.3
Face Detection BlazeFace 1.5
Face Localisation RetinaFace 1.7
Keypoint Detection PP-TinyPose 5.5
Segmentation PP-LiteSeg(STDC1) 32.2
PP-HumanSeg-Lite 0.556
HRNet-w18 38.7
PP-HumanSeg-Server 107.2
Unet 53.7
OCR PP-OCRv1 2.3+4.4
PP-OCRv2 2.3+4.4
PP-OCRv3 2.4+10.6
PP-OCRv3-tiny 2.4+10.7

边缘侧部署

移动端部署

自定义模型部署

社区交流

  • 加入社区👬 微信扫描二维码后,填写问卷加入交流群,与开发者共同讨论推理部署痛点问题

Acknowledge

本项目中SDK生成和下载使用了EasyEdge中的免费开放能力,再次表示感谢。

License

FastDeploy遵循Apache-2.0开源协议

Description
️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
Readme Apache-2.0 158 MiB
Languages
Python 45%
C++ 28.9%
Cuda 25.3%
Shell 0.5%
C 0.2%
Other 0.1%