本文来源电子发烧友社区,作者:大菠萝Alpha, 帖子地址:https://bbs.elecfans.com/jishu_2309330_1_1.html
前面文章已经在Ubuntu20.04的系统上搭建交叉编译环境,并且在EASY EAI Nano开发板上执行了第一个程序。一、下载源码
使用git工具,将远程仓库clone至本地:
复制git clone https://github.com/EASY-EAI/EASY-EAI-Toolkit-C-Solution.gittoolkit内置好几个AI案例,选择solu-helmetDetect。
复制root@EliteDesk:/media/rv1126/EASY-EAI-Toolkit/EASY-EAI-Toolkit-C-Solution$ ls easyeai-api LICENSE README_CN.md README.md solu-EAI-box solu-faceDetect solu-faceRecognition solu-helmetDetect solu-personDetect solu-qrdecode solu-rtspMulitPlayer 二、编译源码开发环境中执行复制./build.sh,过程&结果如下图:
在Release目录下生成了solu-helmetDetect可执行程序。
三、上传需要上传2个文件,一个是前面生成的solu-helmetDetect文件,还有一个是官方提供的模型文件helmet_detect.model。
四、测试运行在EASY EAI Nano开发板上执行复制./solu-helmetDetect。
复制[root@EASY-EAI-NANO:/userdata/Solu]# chmod 777 solu-helmetDetect [root@EASY-EAI-NANO:/userdata/Solu]# ./solu-helmetDetect media get entity by name: rkcif-lvds-subdev is null media get entity by name: rkcif-lite-lvds-subdev is null media get entity by name: rkisp-mpfbc-subdev is null media get entity by name: rkisp_dmapath is null media get entity by name: rkisp-mpfbc-subdev is null media get entity by name: rkisp_dmapath is null media get entity by name: rockchip-mipi-dphy-rx is null [17:30:48.060264][CAMHW]:XCAM ERROR CamHwIsp20.cpp:928: No free isp&ispp needed by fake camera! Rga built version:1.04 13a52df+2022-06-22 17:27:40 Had init the rga dev ctx = 0x57e68 Rga built version:1.04 13a52df+2022-06-22 17:27:40 ##RKMEDIA Log level: 2 [RKMEDIA][SYS][Info]:text is all=2 [RKMEDIA][SYS][Info]:module is all, log_level is 2 ID: 1, sensor_name is m01_f_gc2093 1-007e, iqfiles is /etc/iqfiles rk_aiq_uapi_sysctl_init/prepare succeed rk_aiq_uapi_sysctl_start succeed SAMPLE_COMM_ISP_SetFrameRate start 25 SAMPLE_COMM_ISP_SetFrameRate 25 [RKMEDIA][SYS][Info]:RK_MPI_VI_EnableChn: Enable VI[1:1]:rkispp_scale0, 1920x1080 Start… [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media0 media get entity by name: rkcif-lvds-subdev is null media get entity by name: rkcif-lite-lvds-subdev is null [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media1 media get entity by name: rkisp-mpfbc-subdev is null media get entity by name: rkisp_dmapath is null [RKMEDIA][SYS][Info]:RKAIQ: model(rkisp0): isp_info(0): isp-subdev entity name: /dev/v4l-subdev5 [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media2 media get entity by name: rkisp-mpfbc-subdev is null media get entity by name: rkisp_dmapath is null media get entity by name: rockchip-mipi-dphy-rx is null [RKMEDIA][SYS][Info]:RKAIQ: model(rkisp1): isp_info(1): isp-subdev entity name: /dev/v4l-subdev9 [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media3 [RKMEDIA][SYS][Info]:RKAIQ: model(rkispp0): ispp_info(0): ispp-subdev entity name: /dev/v4l-subdev0 [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media4 [RKMEDIA][SYS][Info]:RKAIQ: model(rkispp1): ispp_info(1): ispp-subdev entity name: /dev/v4l-subdev1 [RKMEDIA][SYS][Info]:#V4l2Stream: camraID:1, Device:rkispp_scale0 [RKMEDIA][SYS][Warn]:camera_id: 1, chn: rkispp_scale0 [RKMEDIA][SYS][Warn]:camera_id: 1, chn: rkispp_scale0, idx: 0 [RKMEDIA][SYS][Info]:#V4l2Stream: camera id:1, VideoNode:/dev/video31 Using mplane plugin for capture [RKMEDIA][SYS][Info]:#V4L2Ctx: open /dev/video31, fd 89 [RKMEDIA][SYS][Info]:RK_MPI_VI_EnableChn: Enable VI[1:1]:rkispp_scale0, 1920x1080 End… [RKMEDIA][SYS][Info]:RK_MPI_VO_CreateChn: Enable VO[1] Start… [RKMEDIA][SYS][Info]:conn id : 56, enc id: 55, crtc id: 53, plane id: 52, w/h: 720,1280, fps: 58 [RKMEDIA][SYS][Info]:RK_MPI_VO_CreateChn: Enable VO[1] End! [RKMEDIA][SYS][Info]:RK_MPI_VO_CreateChn: Enable VO[0] Start… [RKMEDIA][SYS][Info]:conn id : 56, enc id: 55, crtc id: 53, plane id: 54, w/h: 720,1280, fps: 58 [RKMEDIA][SYS][Info]:RK_MPI_VO_CreateChn: Enable VO[0] End! [RKMEDIA][SYS][Info]:RK_MPI_RGA_CreateChn: Enable RGA[0], Rect<0,0,720,1280> Start… [RKMEDIA][SYS][Info]:FilterFlow:rkrga: Enable BufferPool! memtype:hw_mem, memcnt:4 [RKMEDIA][SYS][Info]:Opened DRM device /dev/dri/card0: driver rockchip version 2.0.0. [RKMEDIA][SYS][Info]:RK_MPI_RGA_CreateChn: Enable RGA[0], Rect<0,0,720,1280> End… #Bind rga[0] to VM[0]:Chn[0]…. [RKMEDIA][SYS][Info]:RK_MPI_SYS_Bind: Bind Mode[RGA]:Chn[0] to Mode[VMIX]:Chn[0]… #Bind VMX[0] to VO[0]…. [RKMEDIA][SYS][Info]:RK_MPI_SYS_Bind: Bind Mode[VMIX]:Chn[0] to Mode[VO]:Chn[0]… [RKMEDIA][SYS][Warn]:RK_MPI_SYS_Bind: SrcChn:VMIX[0]:Chn[x] status(3) invalid! librknn_runtime version 1.7.1 (97198ce build: 2021-11-24 09:32:17 base: 1131)因为没有安全帽,网络上找了个戴安全帽的照片,哈哈:)
检测到安全帽:
没有带安全帽:
业务应用打印的log。
免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:【EASY EAI Nano开源套件试用体验】AI功能测试–头盔检测-服务器开源项目 https://www.yhzz.com.cn/a/6920.html