WeChat_20230611224749
评测EASY EAI Nano人工智能开发套件连接屏幕和摄像头,并做个 编译ncnn跑分,首先将开发板套件的几大硬件做连接,整个连接过程还是很方便的,吐槽一下,主板和5寸屏幕的连接线有点不太方便,组装好的化,连接线刚好挡住TF卡槽,取和装TF卡都不方便。
再主板和5寸屏幕的连接线拆卸几次后有点接触不良,屏幕会出现无法点亮的情况,重现安装连线可以解决,但取和装TF卡有一点点不方便。
下面编译ncnn,和做个跑分测试
编译 ncnn 的跑分工具看看模型推理耗时
-
先从百度网盘下载工具链 03.编译器/rv1126_rv1109_compiler_xxxxxxxx.tar.gz
-
工具链解压到本地,比如 /home/nihui/osd/opt/rv1126_rv1109_sdk
-
git clone https://github.com/Tencent/ncnn.git 下载最新版本 ncnn
-
新建 ncnn/toolchains/rv1126.toolchain.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(RV1126_ROOT_PATH "/home/nihui/osd/opt/rv1126_rv1109_sdk/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf")
set(CMAKE_C_COMPILER "${RV1126_ROOT_PATH}/bin/arm-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "${RV1126_ROOT_PATH}/bin/arm-linux-gnueabihf-g++")
set(CMAKE_FIND_ROOT_PATH "${RV1126_ROOT_PATH}/arm-linux-gnueabihf")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mfloat-abi=hard -mfpu=neon")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mfloat-abi=hard -mfpu=neon")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags")
- 交叉编译rv1126的ncnn库和跑分工具
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/rv1126.toolchain.cmake ..
make -j4
- 上传benchncnn和param文件到小板子上
scp ncnn/build/benchmark/benchncnn root@target_ip:/root/
scp ncnn/benchmark/*.param root@target_ip:/root/
- 因为系统里缺少了 libgomp.so.1 库,无法直接运行 benchncnn,于是也上传到小板子上
scp /home/nihui/osd/opt/rv1126_rv1109_sdk/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/arm-linux-gnueabihf/lib/libgomp.so.1 root@target_ip:/root/
scp /home/nihui/osd/opt/rv1126_rv1109_sdk/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/arm-linux-gnueabihf/lib/libgomp.so.1.0.0 root@target_ip:/root/
- 运行benchncnn,结果符合 Cortex-A7 1.5GHz 4核心水平,手指碰碰芯片一点也不烫
[root@EASY-EAI-NANO:~]# LD_LIBRARY_PATH=. ./benchncnn 4 1 0 -1 0
loop_count = 4
num_threads = 1
powersave = 0
gpu_device = -1
cooling_down = 0
squeezenet min = 347.29 max = 349.57 avg = 348.68
squeezenet_int8 min = 243.58 max = 246.40 avg = 244.66
mobilenet min = 587.28 max = 590.97 avg = 589.45
mobilenet_int8 min = 355.43 max = 356.95 avg = 356.13
mobilenet_v2 min = 384.40 max = 388.06 avg = 386.81
mobilenet_v3 min = 313.53 max = 316.49 avg = 315.00
shufflenet min = 195.54 max = 196.91 avg = 196.09
shufflenet_v2 min = 189.91 max = 191.17 avg = 190.60
mnasnet min = 378.74 max = 381.65 avg = 380.00
proxylessnasnet min = 438.49 max = 441.41 avg = 440.19
efficientnet_b0 min = 642.24 max = 643.60 avg = 642.99
efficientnetv2_b0 min = 770.34 max = 776.84 avg = 773.29
regnety_400m min = 487.86 max = 488.81 avg = 488.23
blazeface min = 58.51 max = 59.56 avg = 59.01
googlenet min = 1125.79 max = 1129.31 avg = 1127.91
googlenet_int8 min = 766.64 max = 775.92 avg = 772.11
resnet18 min = 1026.52 max = 1034.20 avg = 1030.92
resnet18_int8 min = 599.47 max = 601.88 avg = 600.49
alexnet min = 739.84 max = 740.37 avg = 740.08
resnet50 min = 2932.26 max = 2940.41 avg = 2935.45
resnet50_int8 min = 1704.34 max = 1709.17 avg = 1706.85
squeezenet_ssd min = 808.41 max = 810.73 avg = 809.45
squeezenet_ssd_int8 min = 588.13 max = 592.90 avg = 589.99
mobilenet_ssd min = 1236.99 max = 1240.53 avg = 1239.07
mobilenet_ssd_int8 min = 717.88 max = 719.66 avg = 718.53
mobilenet_yolo min = 2859.88 max = 2870.28 avg = 2863.96
mobilenetv2_yolov3 min = 1422.87 max = 1432.51 avg = 1428.08
yolov4-tiny min = 1815.68 max = 1819.83 avg = 1818.05
nanodet_m min = 451.71 max = 453.34 avg = 452.66
yolo-fastest-1.1 min = 206.27 max = 208.01 avg = 206.81
yolo-fastestv2 min = 170.55 max = 172.22 avg = 171.54
[root@EASY-EAI-NANO:~]# LD_LIBRARY_PATH=. ./benchncnn 4 4 0 -1 0
loop_count = 4
num_threads = 4
powersave = 0
gpu_device = -1
cooling_down = 0
squeezenet min = 105.16 max = 107.44 avg = 106.40
squeezenet_int8 min = 77.16 max = 78.18 avg = 77.57
mobilenet min = 163.82 max = 164.85 avg = 164.44
mobilenet_int8 min = 97.31 max = 97.56 avg = 97.41
mobilenet_v2 min = 120.65 max = 123.63 avg = 121.44
mobilenet_v3 min = 96.38 max = 96.98 avg = 96.74
shufflenet min = 68.79 max = 69.17 avg = 69.03
shufflenet_v2 min = 69.65 max = 70.27 avg = 69.96
mnasnet min = 114.84 max = 115.03 avg = 114.91
proxylessnasnet min = 128.13 max = 129.04 avg = 128.44
efficientnet_b0 min = 185.84 max = 186.70 avg = 186.38
efficientnetv2_b0 min = 221.02 max = 221.52 avg = 221.22
regnety_400m min = 176.50 max = 176.90 avg = 176.76
blazeface min = 21.35 max = 22.02 avg = 21.72
googlenet min = 320.95 max = 322.98 avg = 321.78
googlenet_int8 min = 223.19 max = 223.78 avg = 223.48
resnet18 min = 320.52 max = 323.48 avg = 322.19
resnet18_int8 min = 168.64 max = 169.50 avg = 169.04
alexnet min = 196.96 max = 197.35 avg = 197.11
resnet50 min = 822.21 max = 830.47 avg = 824.50
resnet50_int8 min = 473.53 max = 474.48 avg = 474.06
squeezenet_ssd min = 268.59 max = 269.26 avg = 268.83
squeezenet_ssd_int8 min = 196.17 max = 196.82 avg = 196.42
mobilenet_ssd min = 336.65 max = 337.49 avg = 337.12
mobilenet_ssd_int8 min = 198.52 max = 199.05 avg = 198.71
mobilenet_yolo min = 765.30 max = 768.77 avg = 767.09
mobilenetv2_yolov3 min = 419.66 max = 420.69 avg = 420.06
yolov4-tiny min = 560.99 max = 568.58 avg = 564.52
nanodet_m min = 169.19 max = 170.39 avg = 169.96
yolo-fastest-1.1 min = 81.48 max = 82.68 avg = 81.94
yolo-fastestv2 min = 66.36 max = 67.32 avg = 66.87
测试结果还是很不错的。
|