当前位置: 首页 > news >正文

搜狗网站做滤芯怎么样子网站怎么做

搜狗网站做滤芯怎么样,子网站怎么做,宣传 网站建设,方维网络的品牌网站建设任务内容 在做ncnn-yolov8-obb模型安卓端移植的过程中#xff0c;对开源代码进行调试。为了确认开源代码yolov8-obb.cpp可以移植开发#xff0c;先对代码进行复现。因此在linux系统下编译yolov8-obb.cpp代码#xff0c;验证项目中的代码是可运行的。然后再把这个代码中的模…任务内容 在做ncnn-yolov8-obb模型安卓端移植的过程中对开源代码进行调试。为了确认开源代码yolov8-obb.cpp可以移植开发先对代码进行复现。因此在linux系统下编译yolov8-obb.cpp代码验证项目中的代码是可运行的。然后再把这个代码中的模型换为自己的缺陷检测模型。 项目代码https://github.com/FeiGeChuanShu/ncnn-android-yolov8 操作流程 编译安装代码需要的ncnn库 linux安装ncnn库 安装依赖项 sudo apt install build-essential git cmake libprotobuf-dev protobuf-compiler libomp-dev libvulkan-dev vulkan-tools libopencv-dev 安装依赖的bazel库 需要在服务器上安装代理软件能够访问bazel官网并下载公钥然后再apt安装。 bazel安装参考https://bazel.build/install/ubuntu?hlzh-cn 安装protobuf 参考官网https://github.com/protocolbuffers/protobuf/blob/main/src/README.md 源码编译ncnn git clone https://github.com/Tencent/ncnn.git cd ncnn mkdir build cd build cmake .. make -j4 sudo make install 完成编译安装结果。 编译代码生成可执行文件 编译流程由于对gcc指令不熟因此采用cmake的方式进行编译。 创建cmakelists.txt将需要include和link的ncnn库opencv库都添加进去。mkdir build cd build cmake .. make生成可执行文件。会遇到的报错问题 问题一libncnn.a(simpleomp.cpp.o): undefined reference to symbol pthread_getspecificGLIBC_2.2.5 [100%] Linking CXX executable yolov8-obb /usr/bin/ld: /home/xbang/cpz/env/ncnn/build/install/lib/libncnn.a(simpleomp.cpp.o): undefined reference to symbol pthread_getspecificGLIBC_2.2.5 /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/yolov8-obb.dir/build.make:102yolov8-obb] 错误 1 make[1]: *** [CMakeFiles/Makefile2:76CMakeFiles/yolov8-obb.dir/all] 错误 2 make: *** [Makefile:84all] 错误 2 原因:是ncnn代码中用了多线程因此在cmake过程中需要指定多线程参数。解决方法在cmakelists.txt中的add_executable()之前增加 set(CMAKE_CXX_FLAGS -pthread) message(STATUS CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) 问题二undefined reference to omp_get_thread_num等 编译器在链接过程中找不到 GOMP_parallel 这个符号还有omp_get_num_threads 和 omp_get_thread_num 等。 /usr/bin/ld: celu.cpp:(.text0x4d): undefined reference to omp_get_thread_num /usr/bin/ld: /home/xbang/cpz/env/ncnn/build/install/lib/libncnn.a(celu.cpp.o): in function ncnn::CELU::forward_inplace(ncnn::Mat, ncnn::Option const) const: celu.cpp:(.text0x180): undefined reference to GOMP_parallel /usr/bin/ld: /home/xbang/cpz/env/ncnn/build/install/lib/libncnn.a(shrink.cpp.o): in function ncnn::Shrink::forward_inplace(ncnn::Mat, ncnn::Option const) const [clone ._omp_fn.0]: shrink.cpp:(.text0x66): undefined reference to omp_get_num_threads /usr/bin/ld: shrink.cpp:(.text0x6d): undefined reference to omp_get_thread_num /usr/bin/ld: /home/xbang/cpz/env/ncnn/build/install/lib/libncnn.a(shrink.cpp.o): in function ncnn::Shrink::forward_inplace(ncnn::Mat, ncnn::Option const) const: shrink.cpp:(.text0x3ac): undefined reference to GOMP_parallel collect2: error: ld returned 1 exit status报错了 原因GOMP_parallel omp_get_num_threadsomp_get_thread_num 都是是 OpenMP 库中的函数或变量。由于ncnn库本身是使用 OpenMP 编译的。因此是ncnn在编译过程对openMP库的设置出了问题。解决方法在cmakelists.txt中option里设置了OPENMP模式为on启用模式。但是文件中另一处使用OPENMP库时if判断条件and配合了另一个库SIMPLEOMP默认是off模式因此我把SIMPLEOMP库的option也设置为on模式。然后再次编译ncnn后就不报这个错误了。 问题三当安装多个版本的opencv时如果用gcc方式编译就会因为设置不明白opencv的库文件路径报错。 解决方法在cmakelist中可以通过find_package的方式找到路径。 测试代码 将代码中的读取图像参数设为图像绝对路径模型文件设为绝对路径然后运行生成的可执行文件得到测试结果图如下
http://www.hkea.cn/news/14280149/

相关文章:

  • 做网站和网页的目的和作用广州哪个区封了
  • 装修设计网站哪个好南京网络推广公司排名
  • flash网站下载重庆做网站建设找谁
  • 北京怎样建设公司网站山东济南网站制作
  • 模板做图 网站有哪些淄博定制网站建设公司
  • 永登县建设局网站推广竞价账户托管
  • 烟台网站制作效果php网站开发设计要求
  • wordpress导航站源码网站页脚怎么做美观
  • 口碑好的网站开发wordpress素才
  • 高校网站建设方案公司网站建设要注意什么问题
  • 网站左侧的导航是怎么做的深圳外贸网站推广
  • 天津建设工程评标专家网站wordpress管理员评论在哪儿设置
  • 安徽建站系统外贸企业网站
  • 不会编程 做网站国产crm
  • 建设银行忘记密码网站模板网站的弊端在哪
  • 忻州专业网站建设湖南人文科技学院校长
  • 做网站大概费用找能做网站的
  • 行业网站运营计划珠海高端网站设计
  • 建设网站的产品规划难道做网站必须用vue框架吗
  • 自己做游戏网站中国电信网上营业厅
  • 做网站公司-深圳信科apache 创建网站
  • 内网怎么做网站装修设计软件有哪些
  • 罗田做网站网站建设最重要的是什么
  • 校园二手市场网站建设做家务的男人网站
  • 龙岗网站建设推广企业文化的重要性和意义
  • 湖北商城网站建设厦门市建设工程造价信息网
  • metro 网站模板零食网站模板
  • 国外化工网站模板wordpress 后台 空白
  • 怎么做系统网站seo分析工具
  • 傻瓜式网站建设软件有哪些怎样做网站结构优化