|
| 1 | +[简体中文](../../cn/faq/boost_cv_by_flycv.md) | English |
| 2 | + |
| 3 | + |
| 4 | +# Accelerate end-to-end inference performance using FlyCV |
| 5 | + |
| 6 | +[FlyCV](https://github.com/PaddlePaddle/FlyCV) is a high performance computer image processing library, providing better performance than other image processing libraries, especially in the ARM architecture. |
| 7 | +FastDeploy is now integrated with FlyCV, allowing users to use FlyCV on supported hardware platforms to accelerate model end-to-end inference performance. |
| 8 | + |
| 9 | +## Supported OS and Architectures |
| 10 | + |
| 11 | +| OS | Architectures | |
| 12 | +| :-----------| :-------- | |
| 13 | +| Android | armeabi-v7a, arm64-v8a | |
| 14 | +| Linux | aarch64, armhf, x86_64| |
| 15 | + |
| 16 | + |
| 17 | +## Usage |
| 18 | +To use FlyCV, you first need to turn on the FlyCV compile option at compile time, and then add a new line of code to turn it on. |
| 19 | +This article uses Linux as an example to show how to enable the FlyCV compile option, and then add a new line of code to use FlyCV during deployment. |
| 20 | + |
| 21 | +You can turn on the FlyCV compile option when compiling the FastDeploy library as follows. |
| 22 | +```bash |
| 23 | +# When compiling C++ libraries |
| 24 | +-DENABLE_VISION=ON |
| 25 | + |
| 26 | +# When compiling Python libraries |
| 27 | +export ENABLE_FLYCV=ON |
| 28 | +``` |
| 29 | + |
| 30 | +You can enable FlyCV by adding a new line of code to the deployment code as follows. |
| 31 | +```bash |
| 32 | +# C++ code |
| 33 | +fastdeploy::vision::EnableFlyCV(); |
| 34 | +# Other..(e.g. With Huawei Ascend) |
| 35 | +fastdeploy::RuntimeOption option; |
| 36 | +option.UseAscend(); |
| 37 | +... |
| 38 | + |
| 39 | + |
| 40 | +# Python code |
| 41 | +fastdeploy.vision.enable_flycv() |
| 42 | +# Other..(e.g. With Huawei Ascend) |
| 43 | +runtime_option = build_option() |
| 44 | +option.use_ascend() |
| 45 | +... |
| 46 | +``` |
| 47 | + |
| 48 | +## Some Platforms FlyCV End-to-End Inference Performance |
| 49 | + |
| 50 | +KunPeng 920 CPU + Atlas 300I Pro. |
| 51 | +| Model | OpenCV E2E Performance(ms) | FlyCV E2E Performance(ms) | |
| 52 | +| :-----------| :-------- | :-------- | |
| 53 | +| ResNet50 | 2.78 | 1.63 | |
| 54 | +| PP-LCNetV2 | 2.50 | 1.39 | |
| 55 | +| YOLOv7 | 27.00 | 21.36 | |
| 56 | +| PP_HumanSegV2_Lite | 2.76 | 2.10 | |
| 57 | + |
| 58 | + |
| 59 | +Rockchip RV1126. |
| 60 | + |
| 61 | +| Model | OpenCV E2E Performance(ms) | FlyCV E2E Performance(ms) | |
| 62 | +| :-----------| :-------- | :-------- | |
| 63 | +| ResNet50 | 9.23 | 6.01 | |
| 64 | +| mobilenetv1_ssld_量化模型 | 9.23 | 6.01 | |
| 65 | +| yolov5s_量化模型 | 28.33 | 14.25 | |
| 66 | +| PP_LiteSeg_量化模型 | 132.25 | 60.31 | |
0 commit comments