Files
FastDeploy/model_zoo/vision/ultraface/README.md
T
DefTruth 9b848038a2 Add UltraFace Model support (#43)
* update .gitignore

* Added checking for cmake include dir

* fixed missing trt_backend option bug when init from trt

* remove un-need data layout and add pre-check for dtype

* changed RGB2BRG to BGR2RGB in ppcls model

* add model_zoo yolov6 c++/python demo

* fixed CMakeLists.txt typos

* update yolov6 cpp/README.md

* add yolox c++/pybind and model_zoo demo

* move some helpers to private

* fixed CMakeLists.txt typos

* add normalize with alpha and beta

* add version notes for yolov5/yolov6/yolox

* add copyright to yolov5.cc

* revert normalize

* fixed some bugs in yolox

* Add UltraFace Model support
2022-07-26 22:15:40 +08:00

1.6 KiB

UltraFace部署示例

当前支持模型版本为:UltraFace CommitID:dffdddd

本文档说明如何进行UltraFace的快速部署推理。本目录结构如下

.
├── cpp                     # C++ 代码目录
│   ├── CMakeLists.txt      # C++ 代码编译CMakeLists文件
│   ├── README.md           # C++ 代码编译部署文档
│   └── ultraface.cc        # C++ 示例代码
├── api.md                  # API 说明文档
├── README.md               # UltraFace 部署文档
└── ultraface.py            # Python示例代码

安装FastDeploy

使用如下命令安装FastDeploy,注意到此处安装的是vision-cpu,也可根据需求安装vision-gpu

# 安装fastdeploy-python工具
pip install fastdeploy-python

# 安装vision-cpu模块
fastdeploy install vision-cpu

Python部署

执行如下代码即会自动下载YOLOv5Face模型和测试图片

python ultraface.py

执行完成后会将可视化结果保存在本地vis_result.jpg,同时输出检测结果如下

FaceDetectionResult: [xmin, ymin, xmax, ymax, score]
742.528931,261.309937, 837.749146, 365.145599, 0.999833
408.159332,253.410889, 484.747284, 353.378052, 0.999832
549.409424,225.051819, 636.311890, 337.824707, 0.999782
185.562805,233.364044, 252.001801, 323.948669, 0.999709
304.065918,180.468140, 377.097961, 278.932861, 0.999645

其它文档