Giter VIP home page Giter VIP logo

ovd-slam's Introduction

OVD-SLAM

OVD-SLAM is an online visual SLAM for dynamic envionments. The library is the basic version of our work. Because some parts of the system are used in a cooperation projects with a company, some functions are not open-source. However, it can also run on your computers and achieve similar performance to complete OVD-SLAM in the paper. ovd-slam

  • Forground and background feature points recognition by object detection and depth information.

  • Dynamic feature recognition by optical flow with a fast speed.(epipolar error and fundmental matrix in this open-source version) The left person is moving while the right person is just standing.

  • Competitive localization accuracy and robustness in dynamic environments are shown on public datasets and in real world by an AR application. pic3-4 pic3-4

1. License

It is built on ORB-SLAM3. If you use OVD-SLAM in an academic work, please cite:

@ARTICLE{10113832,
  author={He, Jiaming and Li, Mingrui and Wang, Yangyang and Wang, Hongyu},
  journal={IEEE Sensors Journal}, 
  title={OVD-SLAM: An Online Visual SLAM for Dynamic Environments}, 
  year={2023},
  volume={23},
  number={12},
  pages={13210-13219},
  doi={10.1109/JSEN.2023.3270534}}

2. Prerequisties

We have tested the library in Ubuntu 18.04, but it should be easy to compile in other platforms. A powerful computer with a GPU (tested on i7-11700 and RTX2060) will ensure real-time performance and provide more stable and accurate results.

C++14 Compiler

The PCL should be compiled by C++14.

Pangolin

It is same as ORB-SLAM3.

OpenCV

We use OpenCV to manipulate images and features. Dowload and install instructions can be found at: http://opencv.org. Required at leat 3.0. Tested with OpenCV 3.2.0, 3.4.17 and 4.2.0.

Eigen3

Required by g2o. Download and install instructions can be found at: http://eigen.tuxfamily.org. Required at least 3.1.0. Tested with Eigen 3.3.7.

TBB

Intel Threading Building Blocks(TBB) is used to accelerate the Tracking thread. We use parallel computation for acceleration in parts such as feature point extraction.

git clone https://github.com/wjakob/tbb.git
mkdir build
cd build
cmake ..
make -j
sudo make install

or

sudo apt-get install libtbb-dev

PCL

Required by dense point cloud mapping. Download and install instructions can be found at: PointCloudLibrary and Linux, respectively. Required at least 1.9. Tested with PCL1.12.

DBoW2, g2o, Sophus and Yolov5 (Included in Thirdparty folder)

We use modified version of the DBoW2 library to perform place recognition and g2o library to perform non-linear optimizations. The Sophus library is used in pose calculation and Yolov5 is modified by TensorRT to provide faster performance. All modified libraries (which are BSD) are included in the Thirdparty folder.

CUDA, cuDNN, TensorRT

For the paper we used CUDA 11.1, cuDNN 8.1.0, and TensorRT 7.2.3.4 with CUDA support. However, we assume that the code should work with a broad range of versions because it doesn't use version-specific features. We can sadly not offer a convenient installation script due to (a) different CUDA installation options and (b) the cuDNN download method that needs user input. You have to:

  • Install CUDA from nvidia.com. Make sure that this doesn't interfere with other packages on your system and maybe ask your system administrator. CUDA 11.1 should be in your path, e.g. setting CUDA_HOME, LD_LIBRARY_PATH and PATH should be sufficient. You can also set the symlink /usr/local/cuda.

  • Install cuDNN from nvidia.com. Make sure to install a version that exactly matches your CUDA and PyTorch versions.

export TANDEM_CUDNN_LIBRARY=/path/to/cudnn/lib64
export TANDEM_CUDNN_INCLUDE_PATH=/path/to/cudnn/include
  • Install TensorRT from nvidia.com Please change the path in CMakeLists.txt of Yolov5
# tensorrt
include_directories(YOUR_PATH_TO_TensorRT/TensorRT-7.x.x.x/include)
link_directories(YOUR_PATH_TO_TensorRT/TensorRT-7.x.x.x/lib)
  • Load the engine models from model and set them in model. note: The models provided in the link only support RTX 20X0. If your GPU is RTX 40X0, RTX 30X0, GTX 10X0 or TITAN, you should generate the engine by yourself.

Python

Required to calculate the alignment of the trajectory with the ground truth. Required Numpy module.

ROS (optional)

We provide some examples to process input of a monocular, monocular-inertial, stereo, stereo-inertial or RGB-D camera using ROS. Building these examples is optional. These have been tested with ROS Melodic under Ubuntu 18.04.

3. Build OVD-SLAM library and examples

Clone the repository:

git clone https://github.com/HJMGARMIN/OVD-SLAM.git

We provide a script build.sh to build the Thirdparty libraries and ORB-SLAM3. Please make sure you have installed all required dependencies (see section 2). Execute:

cd OVD-SLAM
chmod +x build.sh
./build.sh

4. Running OVD-SLAM with your camera

Directory Examples contains several demo programs and calibration files to run OVD-SLAM in all sensor configurations with Intel Realsense cameras T265 and D435i. The steps needed to use your own camera are:

  1. Calibrate your camera following Calibration_Tutorial.pdf and write your calibration file your_camera.yaml

  2. Modify one of the provided demos to suit your specific camera model, and build it

  3. Connect the camera to your computer using USB3 or the appropriate interface

  4. Run OVD-SLAM.

5. Acknowledgments

OVD-SLAM is extended based on ORB-SLAM3, ORB_SLAM3_FAST, DS-SLAM, ORB_SLAM3_dense_map, WF-SLAM, yolov5, tensorrt_yolov5.

ovd-slam's People

Contributors

hjmgarmin avatar

Stargazers

 avatar William Wang avatar  avatar 1001101_QIA avatar 沈志謙 avatar  avatar  avatar  avatar  avatar 赵伟松 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar liheng avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar zw ruan avatar  avatar Weining Ren avatar  avatar Chenghao Xu avatar lalala123 avatar

Watchers

 avatar

ovd-slam's Issues

How to run a point cloud map

我将程序安装完,也成功运行了tum数据集,但是并没有点云地图产生,想问问如何运行出论文里说的稠密点云地图

I have installed the program and successfully ran the TUM dataset, but no point cloud map was generated. I would like to ask how to run the dense point cloud map mentioned in the paper

running error

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!

Initialization of Atlas from scratch
Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name:
load model success
There are 1 cameras in the atlas
Camera 0 is pinhole
0.01 50 1
load model success


Start processing sequence ...
Images in the sequence: 827

First KF:0; Map init KF:0
New Map created with 1071 points
Starting the Viewer
the above is running prompt, i find the running result does not reject dynamic object, its running result is consistent with ORB-SLAM3.
Could answer me, thank you.

run problems

Camera1.k3 optional parameter does not exist...
-Loaded camera 1
Camera.newHeight optional parameter does not exist...
Camera.newWidth optional parameter does not exist...
-Loaded image info
-Loaded RGB-D calibration
-Loaded ORB settings
Viewer.imageViewScale optional parameter does not exist...
-Loaded viewer settings
System.LoadAtlasFromFile optional parameter does not exist...
System.SaveAtlasToFile optional parameter does not exist...
-Loaded Atlas settings
System.thFarPoints optional parameter does not exist...
-Loaded misc parameters
SLAM settings:
-Camera 1 parameters (Pinhole): [ 535.4 539.2 320.1 247.6 ]
-Camera 1 distortion parameters: [ 0 0 0 0 ]
-Original image size: [ 640 , 480 ]
-Current image size: [ 640 , 480 ]
-Sequence FPS: 30
-RGB-D depth map factor: 5000
-Features per image: 1500
-ORB scale factor: 1.2
-ORB number of scales: 8
-Initial FAST threshold: 20
-Min FAST threshold: 7

Loading ORB Vocabulary. This could take a while...
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
已放弃

engine文件问题

您好,我按照tensorrt6.0的版本生成了yolov5x.engine,放到model文件夹里为什么运行后剔除不了动态特征点?

Noisy Depth in Bonn Dataset

Hi @HJMGARMIN,

Thanks for your excellent work! I was wondering did you notice any noise in depth from the Bonn dataset (shown in the attached figure, especially the wall and table)?
Screenshot from 2023-07-13 20-08-00

Following is the code for visualization

import open3d as o3d
import numpy as np


H = 480
W = 640
fx = 542.822841
fy = 542.576870
cx = 315.593520
cy = 237.756098


K = o3d.camera.PinholeCameraIntrinsic(
    width=W,
    height=H,
    fx=fx,
    fy=fy,
    cx=cx,
    cy=cy
)

depth_file = '/home/weining/Downloads/rgbd_bonn_balloon/depth/1548266469.88217.png'
depth_img = o3d.io.read_image(depth_file)
points = o3d.geometry.PointCloud.create_from_depth_image(
    depth = depth_img,
    intrinsic = K,
    depth_scale = 5000,
)

o3d.visualization.draw_geometries([points])

Thanks in advance!
Weining

运行问题

您好,我在运行代码时opencv报错如下,请问您该如何解决?
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.4.0) /home/opencv-4.4.0/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

稠密重建

大佬您好,感谢开源,我看都是国人,我就用中文了,我想问一下运行哪个程序可以实现稠密重建的效果?我运行了rgbd_tum,跑数据集没有看到稠密建图的结果。

关于invSigma2的计算

你好,在源码中const float invSigma2 = 128 * imDepth.at<float>(kp->pt.y, kp->pt.x) * imDepth.at<float>(kp->pt.y, kp->pt.x) / (fx);
在这里的128/fx,我不是很能理解这里的含义,你能帮我解答一下吗?

修改网络结构

请教一下,我自己改了一下yoloV5的网络结构,怎么部署成tensorrt呢?并且orb-slam可以用的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.