LitchiCheng 发表于 2024-3-12 23:18

RV1106手把手教你:惊呆了!USB摄像头秒变AI助手,rknn轻松拍照做yolov5推理!

<div class='showpostmsg'> 本帖最后由 LitchiCheng 于 2024-3-12 23:56 编辑

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;3060-1621846615933&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;p5PQ-1621846617594&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;背景:官方的rknn_yolov5_demo是通过加载一张图片,然后进行推理,实际使用过程中往往需要使用摄像头capture图片后,然后再调用demo进行推理验证,很不方便。&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;t1Bw-1709738910591&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;oNxs-1709738910590&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;故对官网demo进行改造,先将整个yolov5目录复制出来。偷懒的小伙伴可以直接clone我修改好的,github地址如下&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;KW6X-1709739033391&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;SlCQ-1709739033390&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]},{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;XAVo-1708767960961&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https://github.com/LitchiCheng/RV1106_Linux/tree/main&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Ct0g-1708767960962&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;LitchiCheng/RV1106_Linux: Linux test for RV1106 dev board (github.com)&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;G58s-1708767960967&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;2PXH-1709739047914&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;tJuy-1709739047913&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]},{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;p4I5-1709739048148&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https://github.com/LitchiCheng/RV1106_Linux&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;vytj-1709739048147&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;https://github.com/LitchiCheng/RV1106_Linux&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;hipH-1709739048150&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;HwFz-1709738954801&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;KkII-1709738954800&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;下面介绍几个需要特别修改的地方:&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;jUfM-1709739055007&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;tlGC-1709739055006&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;修改工程主目录下的CMakeLists.txt&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;CvIQ-1709739187161&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;L4jH-1709739187160&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;指定交叉编译器&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p><iframe allowfullscreen="true" frameborder="0" height="450" src="//player.bilibili.com/player.html?bvid=1Ci421d7q7&amp;page=1" style="background:#eee;margin-bottom:10px;" width="700"></iframe><br />
背景:官方的rknn_yolov5_demo是通过加载一张图片,然后进行推理,实际使用过程中往往需要使用摄像头capture图片后,然后再调用demo进行推理验证,很不方便。</p>

<p>故对官网demo进行改造,先将整个yolov5目录复制出来。偷懒的小伙伴可以直接clone我修改好的,github地址如下</p>

<p><a href="https://github.com/LitchiCheng/RV1106_Linux/tree/main">LitchiCheng/RV1106_Linux: Linux test for RV1106 dev board (github.com)</a></p>

<p><a href="https://github.com/LitchiCheng/RV1106_Linux">https://github.com/LitchiCheng/RV1106_Linux</a></p>

<p>下面介绍几个需要特别修改的地方:</p>

<p>修改工程主目录下的CMakeLists.txt</p>

<p>指定交叉编译器</p>

<pre>
<code>set (CMAKE_C_COMPILER "/mnt/d/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc")
set (CMAKE_CXX_COMPILER "/mnt/d/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-g++")</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;wIDF-1709739166283&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;IOvO-1709739166282&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;增加预编译变量的声明&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>增加预编译变量的声明</p>

<pre>
<code>add_definitions(-DRV1106_1103)</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;47zP-1709738977976&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;textIndent&quot;:0}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;51cE-1709738977977&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;增加我们上期分享的v4l2的工具类&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>增加我们上期分享的v4l2的工具类</p>

<pre>
<code>add_executable(${PROJECT_NAME}
    main.cc
    postprocess.cc
    ../v4l2/tools/v4l2CapPicTool.cpp
    ${rknpu2_yolov5_file}
)</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Ldsh-1709739103034&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;AefW-1709739103035&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;修改cmake安装路径,很多,这里只放一个,具体看整个工程&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>修改cmake安装路径,很多,这里只放一个,具体看整个工程</p>

<pre>
<code>install(TARGETS ${PROJECT_NAME} DESTINATION ${OUTPUTPATH})</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;jDaA-1709739127970&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;sokO-1709739127971&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;修改RV1106_Linux/yolov5/3rdparty下的CMakeLists.txt&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;disI-1709739277227&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;eGiw-1709739277226&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;直接设置架构类型为armhf_uclibc&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>修改RV1106_Linux/yolov5/3rdparty下的CMakeLists.txt</p>

<p>直接设置架构类型为armhf_uclibc</p>

<pre>
<code>if (CMAKE_C_COMPILER MATCHES "uclibc")
    set (TARGET_LIB_ARCH ${TARGET_LIB_ARCH}_uclibc)
endif()</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;91cQ-1709739274913&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;DHyW-1709739274914&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;修改runtime库,直接用armhf_uclibc版本&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>修改runtime库,直接用armhf_uclibc版本</p>

<pre>
<code># rknn runtime
set(RKNN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/rknpu2)
set(LIBRKNNRT ${RKNN_PATH}/${CMAKE_SYSTEM_NAME}/armhf-uclibc/librknnmrt.so)
set(LIBRKNNRT_INCLUDES ${RKNN_PATH}/include PARENT_SCOPE)
install(PROGRAMS ${LIBRKNNRT} DESTINATION ${OUTPUTPATH}/lib)
set(LIBRKNNRT ${LIBRKNNRT} PARENT_SCOPE)</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;7oud-1709739326214&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;wrFO-1709739326215&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;然后修改main.cc,如下,增加对v4l2的调用&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>然后修改main.cc,如下,增加对v4l2的调用</p>

<pre>
<code>int main(int argc, char **argv)
{
    if (argc != 3)
    {
      printf("%s &lt;model_path&gt; &lt;camera_path&gt;\n", argv);
      return -1;
    }

    const char *model_path = argv;
    const char *image_path = "tmp.jpg";

    std::string camera_path = std::string(argv);
    v4l2CapPicTool vt(camera_path, 1080, 960, "jpg");
    vt.init();

    int ret;
    rknn_app_context_t rknn_app_ctx;
    memset(&amp;rknn_app_ctx, 0, sizeof(rknn_app_context_t));

    init_post_process();

    ret = init_yolov5_model(model_path, &amp;rknn_app_ctx);
    if (ret != 0)
    {
      printf("init_yolov5_model fail! ret=%d model_path=%s\n", ret, model_path);
      goto out;
    }
    vt.capture();
    vt.save("tmp.jpg");
    image_buffer_t src_image;
    memset(&amp;src_image, 0, sizeof(image_buffer_t));
    ret = read_image("tmp.jpg", &amp;src_image);

#if defined(RV1106_1103)
    //RV1106 rga requires that input and output bufs are memory allocated by dma
    ret = dma_buf_alloc(RV1106_CMA_HEAP_PATH, src_image.size, &amp;rknn_app_ctx.img_dma_buf.dma_buf_fd,
                     (void **) &amp; (rknn_app_ctx.img_dma_buf.dma_buf_virt_addr));
    memcpy(rknn_app_ctx.img_dma_buf.dma_buf_virt_addr, src_image.virt_addr, src_image.size);
    dma_sync_cpu_to_device(rknn_app_ctx.img_dma_buf.dma_buf_fd);
    free(src_image.virt_addr);
    src_image.virt_addr = (unsigned char *)rknn_app_ctx.img_dma_buf.dma_buf_virt_addr;
#endif

                                                                        //.....

    return 0;
}
</code></pre>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;7d3j-1709735831615&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;nnA7-1709735831616&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;创建构建目录&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>创建构建目录</p>

<pre>
<code>mkdir build
cd build
cmake ..
make
make install </code></pre>

<p> &nbsp;</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;0xZL-1709739374860&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;MSQS-1709739374859&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;生成的文件都放在主目录下的output&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<p>生成的文件都放在主目录下的output</p>

<p> &nbsp;复制到开发板中,运行测试</p>

<article data-content="[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;1dox-1709739392651&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;DvpV-1709739392650&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;复制到开发板中,运行测试&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}}]">
<pre>
<code>pico@luckfox:~/output$ sudo ./rknn_yolov5_realtime model/yolov5s_relu.rknn /dev/video9
init success
load lable ./model/coco_80_labels_list.txt
model input num: 1, output num: 3
input tensors:
index=0, name=images, n_dims=4, dims=, n_elems=1228800, size=1228800, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
output tensors:
index=0, name=output, n_dims=4, dims=, n_elems=1632000, size=1632000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003860
index=1, name=283, n_dims=4, dims=, n_elems=408000, size=408000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
index=2, name=285, n_dims=4, dims=, n_elems=102000, size=102000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003915
model is NHWC input fmt
model input height=640, width=640, channel=3
origin size=960x720 crop size=960x720
input image: 960 x 720, subsampling: 4:2:2, colorspace: YCbCr, orientation: 1
scale=0.666667 dst_box=(0 80 639 559) allow_slight_change=1 _left_offset=0 _top_offset=80 padding_w=0 padding_h=160
src width=960 height=720 fmt=0x1 virAddr=0x0x558b65c400 fd=0
dst width=640 height=640 fmt=0x1 virAddr=0x0x558b856810 fd=0
src_box=(0 0 959 719)
dst_box=(0 80 639 559)
color=0x72
fill dst image (x y w h)=(0 0 640 640) with color=0x72727272
rga_api version 1.10.0_
rknn_run
book @ (268 189 544 457) 0.581
book @ (274 4 537 255) 0.522
book @ (238 372 555 637) 0.481
book @ (216 472 502 697) 0.477
tv @ (759 0 958 586) 0.357
suitcase @ (580 48 693 126) 0.223
write_image path: out.png width=960 height=720 channel=3 data=0x558b65c400

</code></pre>

<p> &nbsp;</p>
</article>
</article>
</article>
</article>
</article>
</article>
</article>
</article>
</article>
</article>
</div><script>                                var loginstr = '<div class="locked">查看精华帖全部内容,请<a href="javascript:;"   style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
                               
                                if(parseInt(discuz_uid)==0){
                                                                                        (function($){
                                                        var postHeight = getTextHeight(400);
                                                        $(".showpostmsg").html($(".showpostmsg").html());
                                                        $(".showpostmsg").after(loginstr);
                                                        $(".showpostmsg").css({height:postHeight,overflow:"hidden"});
                                                })(jQuery);
                                }
</script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>

怀揣少年梦 发表于 2024-3-13 10:58

<p>对摄像头拍的实时画面进行推理吗?</p>

tagetage 发表于 2024-3-13 10:58

<p>我这方面不懂,楼主,加载一张图片,然后进行推理,是什么意思? 推理什么??能详细讲一下吗???</p>

LitchiCheng 发表于 2024-3-13 11:19

怀揣少年梦 发表于 2024-3-13 10:58
对摄像头拍的实时画面进行推理吗?

<p>对,改成循环就可以了</p>

LitchiCheng 发表于 2024-3-13 11:20

tagetage 发表于 2024-3-13 10:58
我这方面不懂,楼主,加载一张图片,然后进行推理,是什么意思? 推理什么??能详细讲一下吗???

<p>这个可以搜一下哈,DL方面的,一句两句讲不清楚</p>

wangerxian 发表于 2024-3-13 11:58

<p>推理的时候用NPU了嘛。</p>

怀揣少年梦 发表于 2024-3-13 13:03

LitchiCheng 发表于 2024-3-13 11:19
对,改成循环就可以了

<p>学习一下</p>

LitchiCheng 发表于 2024-3-13 13:07

wangerxian 发表于 2024-3-13 11:58
推理的时候用NPU了嘛。

<p>rknn,可以看视频,里面有讲</p>

freebsder 发表于 2024-3-13 15:45

<p>rknn的算力有多少?实时的话会不会卡?</p>

cruise__tom123 发表于 2024-3-13 16:59

<p>先收下,感谢楼主</p>

LitchiCheng 发表于 2024-3-13 21:48

cruise__tom123 发表于 2024-3-13 16:59
先收下,感谢楼主

<p>一键三连了吗,哈哈哈哈</p>

LitchiCheng 发表于 2024-3-13 21:49

freebsder 发表于 2024-3-13 15:45
rknn的算力有多少?实时的话会不会卡?

<p>&nbsp; 0.5 t,应该不会卡,推理没啥问题</p>

li-ai-meng 发表于 2024-4-26 13:18

<p>lyh@lyh-pc:~/RV1106_Linux-main/yolov5/build$ cmake ..<br />
-- The C compiler identification is unknown<br />
-- The CXX compiler identification is unknown<br />
CMake Error at CMakeLists.txt:6 (project):<br />
&nbsp; The CMAKE_C_COMPILER:</p>

<p>&nbsp; &nbsp; /mnt/d/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc</p>

<p>&nbsp; is not a full path to an existing compiler tool.</p>

<p>&nbsp; Tell CMake where to find the compiler by setting either the environment<br />
&nbsp; variable &quot;CC&quot; or the CMake cache entry CMAKE_C_COMPILER to the full path to<br />
&nbsp; the compiler, or to the compiler name if it is in the PATH.</p>

<p><br />
CMake Error at CMakeLists.txt:6 (project):<br />
&nbsp; The CMAKE_CXX_COMPILER:</p>

<p>&nbsp; &nbsp; /mnt/d/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-g++</p>

<p>&nbsp; is not a full path to an existing compiler tool.</p>

<p>&nbsp; Tell CMake where to find the compiler by setting either the environment<br />
&nbsp; variable &quot;CXX&quot; or the CMake cache entry CMAKE_CXX_COMPILER to the full path<br />
&nbsp; to the compiler, or to the compiler name if it is in the PATH.</p>

<p><br />
-- Configuring incomplete, errors occurred!<br />
See also &quot;/home/lyh/RV1106_Linux-main/yolov5/build/CMakeFiles/CMakeOutput.log&quot;.<br />
See also &quot;/home/lyh/RV1106_Linux-main/yolov5/build/CMakeFiles/CMakeError.log&quot;.<br />
CMake无法找到正确的C和C++编译器<br />
请问这个怎么解决</p>

LitchiCheng 发表于 2024-4-28 15:50

li-ai-meng 发表于 2024-4-26 13:18
lyh@lyh-pc:~/RV1106_Linux-main/yolov5/build$ cmake ..
-- The C compiler identification is unknown
...

<p>/mnt/d/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc</p>

<p>修改你对应sdk的位置,这个是我电脑的位置</p>

fimai 发表于 2024-10-31 14:26

本帖最后由 fimai 于 2024-10-31 17:30 编辑

<p>运行时报错,是什么问题</p>

<p>load lable ./model/coco_80_labels_list.txt<br />
E RKNN: failed to decode config data!<br />
Segmentation fault (core dumped)</p>

LitchiCheng 发表于 2024-11-2 12:12

fimai 发表于 2024-10-31 14:26
运行时报错,是什么问题

load lable ./model/coco_80_labels_list.txt
E RKNN: failed to decode confi ...

<p>越界之类的吧</p>

h1mple 发表于 2024-11-8 10:46

<p>ubuntu@ubuntu:~/luckfox-pico/RV1106_Linux/yolov5/build$ make<br />
[ 16%] Built target imageutils<br />
[ 33%] Built target fileutils<br />
[ 50%] Built target imagedrawing<br />
make: *** No rule to make target &#39;/home/ubuntu/luckfox-pico/RV1106_Linux/sources/3rdparty/rknpu2/Linux/armhf-uclibc/librknnmrt.so&#39;, needed by &#39;rknn_yolov5_realtime&#39;. &nbsp;Stop.<br />
make: *** Error 2<br />
make: *** Error 2<br />
这是为啥呀</p>

fimai 发表于 2024-11-11 16:12

LitchiCheng 发表于 2024-3-13 11:19
对,改成循环就可以了

<p>改成循环的要怎么改,我改了之后,运行一会就报RK_DMA_HEAP_ALLOC_BUFFER failed:Cannot allocate memory错误,不知道哪里没释放</p>
页: [1]
查看完整版本: RV1106手把手教你:惊呆了!USB摄像头秒变AI助手,rknn轻松拍照做yolov5推理!