PaddleLite使用瑞芯微NPU预测部署

注意:1)run_with_adb.sh不能在docker环境执行,否则可能无法找到设备,也不能在设备上运行;2)run_with_ssh.sh不能在设备上运行,且执行前需要配置目标设备的IP地址、SSH账号和密码;2)build.sh需要在docker环境中执行,如果需要测试armhf库,可将build.sh的TARGET_ARCH_ABI修改成armhf后重新生成image_classification_demo。运行适用于ARM CPU的mobilenetv1全量化模型$ cd PaddleLite-linux-demo/image_classification_demo/assets/models$ cp mobilenet_v1_int8_224_for_cpu/model.nb mobilenet_v1_int8_224_for_cpu_fluid.nb$ cd ../../shell$ vim ./run_with_adb.sh 或 vim ./run_with_ssh.sh  MODEL_NAME设置为mobilenet_v1_int8_224_for_cpu_fluidFor RK1808 EVB$ ./run_with_adb.sh arm64  (RK1808 EVB)  warmup: 5 repeat: 10, average: 266.276001 ms, max: 266.576996 ms, min: 266.158997 ms  results: 3  Top0  tabby, tabby cat - 0.522023  Top1  Egyptian cat - 0.395266  Top2  tiger cat - 0.073605  Preprocess time: 2.684000 ms  Prediction time: 266.276001 ms  Postprocess time: 0.456000 msFor RK1806/RV1126/RV1109 EVB$ ./build.sh armhf$ ./run_with_adb.sh armhf  (RV1126 EVB)  warmup: 5 repeat: 10, average: 338.019904 ms, max: 371.528992 ms, min: 331.010010 ms  results: 3  Top0  tabby, tabby cat - 0.522023  Top1  Egyptian cat - 0.395266  Top2  tiger cat - 0.073605  Preprocess time: 3.443000 ms  Prediction time: 338.019904 ms  Postprocess time: 0.600000 ms  (RV1109 EVB)  warmup: 5 repeat: 10, average: 335.438400 ms, max: 346.362000 ms, min: 331.894012 ms  results: 3  Top0  tabby, tabby cat - 0.522023  Top1  Egyptian cat - 0.395266  Top2  tiger cat - 0.073605  Preprocess time: 3.420000 ms  Prediction time: 335.438400 ms  Postprocess time: 0.582000 msFor TB-RK1808S0 AI计算棒$ ./run_with_ssh.sh arm64  (TB-RK1808S0 AI计算棒)  warmup: 5 repeat: 10, average: 358.836304 ms, max: 361.001007 ms, min: 358.035004 ms  results: 3  Top0  tabby, tabby cat - 0.522023  Top1  Egyptian cat - 0.395266  Top2  tiger cat - 0.073605  Preprocess time: 3.670000 ms  Prediction time: 358.836304 ms  Postprocess time: 0.542000 ms运行适用于Rockchip NPU的mobilenetv1全量化模型$ cd PaddleLite-linux-demo/image_classification_demo/assets/models$ cp mobilenet_v1_int8_224_for_rockchip_npu/model.nb mobilenet_v1_int8_224_for_rockchip_npu_fluid.nb$ cd ../../shell$ vim ./run_with_adb.sh 或 vim ./run_with_ssh.sh  MODEL_NAME设置为mobilenet_v1_int8_224_for_rockchip_npu_fluidFor RK1808 EVB$ ./run_with_adb.sh arm64  (RK1808 EVB)  warmup: 5 repeat: 10, average: 6.663300 ms, max: 6.705000 ms, min: 6.590000 ms  results: 3  Top0  Egyptian cat - 0.514779  Top1  tabby, tabby cat - 0.421183  Top2  tiger cat - 0.052648  Preprocess time: 2.391000 ms  Prediction time: 6.663300 ms  Postprocess time: 0.470000 msFor RK1806/RV1126/RV1109 EVB$ ./build.sh armhf$ ./run_with_adb.sh armhf  (RV1126 EVB)  warmup: 5 repeat: 10, average: 5.956600 ms, max: 6.083000 ms, min: 5.860000 ms  results: 3  Top0  Egyptian cat - 0.497230  Top1  tabby, tabby cat - 0.409483  Top2  tiger cat - 0.081897  Preprocess time: 3.514000 ms  Prediction time: 5.956600 ms  Postprocess time: 0.539000 ms  (RV1109 EVB)  warmup: 5 repeat: 10, average: 7.163200 ms, max: 7.459000 ms, min: 7.055000 ms  results: 3  Top0  Egyptian cat - 0.497230  Top1  tabby, tabby cat - 0.409483  Top2  tiger cat - 0.081897  Preprocess time: 3.465000 ms  Prediction time: 7.163200 ms  Postprocess time: 0.595000 msFor TB-RK1808S0 AI计算棒$ ./run_with_ssh.sh arm64  (TB-RK1808S0 AI计算棒)  warmup: 5 repeat: 10, average: 9.819400 ms, max: 9.970000 ms, min: 9.776000 ms  results: 3  Top0  Egyptian cat - 0.514779  Top1  tabby, tabby cat - 0.421183  Top2  tiger cat - 0.052648  Preprocess time: 4.277000 ms  Prediction time: 9.819400 ms  Postprocess time: 5.776000 ms
(0)

相关推荐