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

复现ORB3-YOLO8项目记录

文章目录

  • 1.编译错误
    • 1.1 错误1
    • 1.2 错误2
    • 1.3 错误3
    • 1.4 错误4


1.编译错误

首先ORB-SLAM相关项目已经写过很多篇博客了,从ORB-SLAM2怎么运行,再到现在的项目。关于环境已经不想多说了

1.1 错误1

– DEPENDENCY_LIBS : /home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.3/lib/libfastdeploy.so;/home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.3/third_libs/install/onnxruntime/lib/libonnxruntime.so;/home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.3/third_libs/install/paddle_inference/paddle/lib/libpaddle_inference.so;/home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.4/third_libs/install/paddle_inference/third_party/install/mkldnn/lib/libmkldnn.so.0;/home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.4/third_libs/install/paddle_inference/third_party/install/mklml/lib/libiomp5.so;/home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.3/third_libs/install/openvino/runtime/lib/libopenvino.so;TBB::tbb;TBB::tbbmalloc;TBB::tbbmalloc_proxy;opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_shape;opencv_superres;opencv_videostab;/home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.3/third_libs/install/fast_tokenizer/lib/libcore_tokenizers.so;/home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.3/third_libs/install/paddle2onnx/lib/libpaddle2onnx.so
– BUILD TYPE:Release
– Compiling on Unix
– Configuring done
– Generating done
– Build files have been written to: /home/lvslam/ORB3-YOLO8/build [ 50%] Built target g2o make[2]: ***
没有规则可制作目标“…/Thirdparty/fastdeploy-linux-x64-1.0.3/lib/libfastdeploy.so”,由“…/lib/libORB_SLAM3.so”
需求。 停止。 make[1]: ***
[CMakeFiles/Makefile2:126:CMakeFiles/ORB_SLAM3.dir/all] 错误 2 make: ***
[Makefile:84:all] 错误 2

这个项目的博主没有说应该用哪个版本的fastdeploy-linux-x64-1.0.3,我就先下载了fastdeploy-linux-x64-1.0.3版本,但是编译不过去
经过测试换成fastdeploy-linux-x64-1.0.4即可!

1.2 错误2

[100%] Linking CXX executable …/Examples/RGB-D/rgbd_tum /usr/bin/ld:
warning: libopencv_video.so.3.4, needed by
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so, not
found (try using -rpath or -rpath-link) /usr/bin/ld: warning:
libopencv_highgui.so.3.4, needed by
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so, not
found (try using -rpath or -rpath-link) /usr/bin/ld: warning:
libopencv_videoio.so.3.4, needed by
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so, not
found (try using -rpath or -rpath-link) /usr/bin/ld: warning:
libopencv_imgcodecs.so.3.4, needed by
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so, not
found (try using -rpath or -rpath-link) /usr/bin/ld: warning:
libopencv_imgproc.so.3.4, needed by
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so, not
found (try using -rpath or -rpath-link) /usr/bin/ld: warning:
libopencv_core.so.3.4, needed by
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so, not
found (try using -rpath or -rpath-link) /usr/bin/ld:
CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o: in function
CpuInfer(std::__cxx11::basic_string<char, std::char_traits,
std::allocator > const&, std::__cxx11::basic_string<char,
std::char_traits, std::allocator >,
fastdeploy::vision::DetectionResult*)‘: rgbd_tum.cc:(.text+0xd93):
undefined reference to cv::imread(cv::String const&, int)’
/usr/bin/ld: rgbd_tum.cc:(.text+0xd9b): undefined reference to
cv::String::deallocate()’ /usr/bin/ld: rgbd_tum.cc:(.text+0x104a):
undefined reference to cv::String::allocate(unsigned long)’
/usr/bin/ld: CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o: in
function GpuInfer(std::__cxx11::basic_string<char,
std::char_traits, std::allocator > const&,
std::__cxx11::basic_string<char, std::char_traits,
std::allocator >, fastdeploy::vision::DetectionResult*)‘:
rgbd_tum.cc:(.text+0x153f): undefined reference to
cv::imread(cv::String const&, int)’ /usr/bin/ld:
rgbd_tum.cc:(.text+0x1547): undefined reference to
cv::String::deallocate()’ /usr/bin/ld: rgbd_tum.cc:(.text+0x17fa):
undefined reference to cv::String::allocate(unsigned long)’
/usr/bin/ld: CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o: in
function TrtInfer(std::__cxx11::basic_string<char,
std::char_traits, std::allocator > const&,
std::__cxx11::basic_string<char, std::char_traits,
std::allocator >, fastdeploy::vision::DetectionResult*)‘:
rgbd_tum.cc:(.text+0x1df5): undefined reference to
cv::imread(cv::String const&, int)’ /usr/bin/ld:
rgbd_tum.cc:(.text+0x1dfd): undefined reference to
cv::String::deallocate()’ /usr/bin/ld: rgbd_tum.cc:(.text+0x20ea):
undefined reference to cv::String::allocate(unsigned long)’
/usr/bin/ld: CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o: in
function CpuInfer(std::__cxx11::basic_string<char,
std::char_traits, std::allocator > const&,
std::__cxx11::basic_string<char, std::char_traits,
std::allocator >, fastdeploy::vision::DetectionResult*) [clone
.cold]‘: rgbd_tum.cc:(.text.unlikely+0x35d): undefined reference to
cv::String::deallocate()’ /usr/bin/ld:
CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o: in function
GpuInfer(std::_cxx11::basic_string<char, std::char_traits,
std::allocator > const&, std::cxx11::basic_string<char,
std::char_traits, std::allocator >,
fastdeploy::vision::DetectionResult*) [clone .cold]‘:
rgbd_tum.cc:(.text.unlikely+0x3b7): undefined reference to
cv::String::deallocate()’ /usr/bin/ld:
CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o: in function
TrtInfer(std::cxx11::basic_string<char, std::char_traits,
std::allocator > const&, std::cxx11::basic_string<char,
std::char_traits, std::allocator >,
fastdeploy::vision::DetectionResult*) [clone .cold]‘:
rgbd_tum.cc:(.text.unlikely+0x402): undefined reference to
cv::String::deallocate()’ /usr/bin/ld:
CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o: in function
main.cold’: rgbd_tum.cc:(.text.unlikely+0x5d1): undefined reference to
cv::String::deallocate()’ /usr/bin/ld:
rgbd_tum.cc:(.text.unlikely+0x628): undefined reference to
cv::String::deallocate()’ /usr/bin/ld:
CMakeFiles/rgbd_tum.dir/Examples/RGB-D/rgbd_tum.cc.o: in function
main’: rgbd_tum.cc:(.text.startup+0xc42): undefined reference to
cv::Mat::Mat()’ /usr/bin/ld: rgbd_tum.cc:(.text.startup+0xc4e):
undefined reference to cv::Mat::Mat()’ /usr/bin/ld:
rgbd_tum.cc:(.text.startup+0xe7c): undefined reference to
cv::imread(cv::String const&, int)’ /usr/bin/ld:
rgbd_tum.cc:(.text.startup+0xf55): undefined reference to
cv::String::deallocate()’ /usr/bin/ld:
rgbd_tum.cc:(.text.startup+0x1121): undefined reference to
cv::imread(cv::String const&, int)’ /usr/bin/ld:
rgbd_tum.cc:(.text.startup+0x120a): undefined reference to
cv::String::deallocate()’ /usr/bin/ld:
rgbd_tum.cc:(.text.startup+0x1e13): undefined reference to
cv::String::allocate(unsigned long)’ /usr/bin/ld:
rgbd_tum.cc:(.text.startup+0x1eb2): undefined reference to
cv::String::allocate(unsigned long)’ /usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::InputArray::InputArray(cv::MatExpr
const&)’ /usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::getTextSize(cv::String const&, int, double, int, int*)’
/usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::rectangle(cv::Mat&, cv::Rect
,
cv::Scalar
const&, int, int, int)’ /usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::findContours(cv::InputOutputArray const&,
cv::OutputArray const&, cv::OutputArray const&, int, int,
cv::Point
)’ /usr/bin/ld: …/lib/libORB_SLAM3.so: undefined
reference to cv::Mat::Mat(int, int, int)’ /usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::fillPoly(cv::Mat&, cv::Point
const**,
int const*, int, cv::Scalar
const&, int, int,
cv::Point
)’ /usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::KalmanFilter::predict(cv::Mat const&)’
/usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::KalmanFilter::correct(cv::Mat const&)’
/usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::read(cv::FileNode const&, cv::String&, cv::String const&)’
/usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::putText(cv::InputOutputArray const&, cv::String const&,
cv::Point
, int, double, cv::Scalar
, int, int, bool)’
/usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::OutputArray::create(int, int, int, int, bool, int) const’
/usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::namedWindow(cv::String const&, int)’ /usr/bin/ld:
…/lib/libORB_SLAM3.so: undefined reference to
cv::write(cv::FileStorage&, cv::String const&, int)’ /usr/bin/ld:
…/lib/libORB_SLAM3.so: undefined reference to
cv::FileStorage::operator[](cv::String const&) const’ /usr/bin/ld:
…/lib/libORB_SLAM3.so: undefined reference to cv::Mat::Mat(int, int,
int, cv::Scalar
const&)’ /usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::getPerspectiveTransform(cv::Point

const*, cv::Point
const*)’ /usr/bin/ld:
…/lib/libORB_SLAM3.so: undefined reference to cv::error(int,
cv::String const&, char const*, char const*, int)’ /usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::KalmanFilter::KalmanFilter(int, int, int,
int)’ /usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::operator<<(cv::FileStorage&, cv::String const&)’ /usr/bin/ld:
…/lib/libORB_SLAM3.so: undefined reference to cv::Mat::Mat()’
/usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::Formatter::get(int)’ /usr/bin/ld: …/lib/libORB_SLAM3.so:
undefined reference to cv::write(cv::FileStorage&, cv::String const&,
double)’ /usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::FileStorage::FileStorage(cv::String const&, int, cv::String
const&)’ /usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::Mat::Mat(int, int, int)’ /usr/bin/ld: …/lib/libORB_SLAM3.so:
undefined reference to cv::Mat::Mat(cv::Size
, int)’ /usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::polylines(cv::Mat&, cv::Point
const*
const*, int const*, int, bool, cv::Scalar
const&, int, int,
int)’ /usr/bin/ld: …/lib/libORB_SLAM3.so: undefined reference to
cv::Mat::total() const’ /usr/bin/ld: …/lib/libORB_SLAM3.so: undefined
reference to cv::Mat::step1(int) const’ /usr/bin/ld:
…/lib/libORB_SLAM3.so: undefined reference to cv::imshow(cv::String
const&, cv::_InputArray const&)’ /usr/bin/ld:
…/Thirdparty/fastdeploy-linux-x64-1.0.4/lib/libfastdeploy.so:
undefined reference to cv::imwrite(cv::String const&, cv::_InputArray
const&, std::vector<int, std::allocator > const&)’ collect2:
error: ld returned 1 exit status make[2]: ***
[CMakeFiles/rgbd_tum.dir/build.make:133:…/Examples/RGB-D/rgbd_tum] 错误
1 make[1]: *** [CMakeFiles/Makefile2:99:CMakeFiles/rgbd_tum.dir/all]
错误 2 make: *** [Makefile:84:all] 错误 2

因为跑上一个项目我用的是OpenCv4.2的版本,所以更新了一些库,这里造成部分库缺失
所以只需要将OpenCv换成3.4.5版本即可,但是重新卸载OpenCv太过麻烦,所以我们可以安装多个版本的OpenCv。
跑不同项目切换不同版本即可!!
链接: OpenCv多版本共存的安装路径与切换使用

还要注意CMakeLists中的版本!!

1.3 错误3

在这里插入图片描述

./Examples/RGB-D/rgbd_tum: error while loading shared libraries: libonnxruntime.so.1.12.0: cannot open shared object file: No such file or directory

解决方法:
执行 source /path/to/fastdeploy-linux-xxx/fastdeploy_init.sh

source /home/lvslam/ORB3-YOLO8/Thirdparty/fastdeploy-linux-x64-1.0.4/fastdeploy_init.sh 

1.4 错误4

执行命令

./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml /home/lvslam/ORB3-YOLO8/evaluation/rgbd_dataset_freiburg3_walking_xyz /home/lvslam/ORB3-YOLO8/evaluation/rgbd_dataset_freiburg3_walking_xyz/associations.txt cpu

在这里插入图片描述
这是找不到文件,我们需要在当前目录下建立一个model文件夹,然后把yolov8n.onnx放进去就可以了!
在这里插入图片描述
至此我们就又成功复现一个项目!

http://www.lryc.cn/news/399545.html

相关文章:

  • 【jvm】字符串常量池问题
  • STM32学习和实践笔记(39):I2C EEPROM实验
  • 【Js】导出 HTML 为 Word 文档
  • c++入门基础篇(上)
  • Java实现数据结构——双链表
  • Python应用爬虫下载QQ音乐歌曲!
  • AWS-WAF-Log S3存放,通过Athena查看
  • 无法解析主机:mirrorlist.centos.org Centos 7
  • 自动驾驶论文总结
  • 【uniapp微信小程序】uniapp微信小程序——页面通信
  • 【笔记】从零开始做一个精灵龙女-画贴图阶段(上)
  • 线性代数|机器学习-P22逐步最小化一个函数
  • SpringCloudAlibaba Nacos配置中心与服务发现
  • .NET 一款获取内网共享机器的工具
  • 备考美国数学竞赛AMC8和AMC10:吃透1850道真题和知识点(持续)
  • 旅游景区度假村展示型网站如何建设渠道品牌
  • Python酷库之旅-第三方库Pandas(021)
  • jvm 06 补充 OOM 和具体工具使用
  • 使用机器学习 最近邻算法(Nearest Neighbors)进行点云分析 (scikit-learn Open3D numpy)
  • 安装jenkins最新版本初始化配置及使用JDK1.8构建项目详细讲解
  • 微软子公司Xandr遭隐私诉讼,或面临巨额罚款
  • 【VRP】基于常春藤算法IVY求解带时间窗的车辆路径问题TWVRP,最短距离附Matlab代码
  • 常用软件的docker compose安装
  • Excel第28享:如何新建一个Excel表格
  • 计算机网络知识汇总
  • 数据结构——考研笔记(二)线性表的定义和线性表之顺序表
  • quota使用
  • 解决fidder小黑怪倒出JMeter文件缺失域名、请求头
  • 智慧城市的神经网络:Transformer模型在智能城市构建中的应用
  • 产品经理-研发流程-敏捷开发-迭代-需求评审及产品规划(15)