GithubHelp home page GithubHelp logo

natsu-akatsuki / rangenettrt8 Goto Github PK

View Code? Open in Web Editor NEW
44.0 2.0 9.0 7.22 MB

tensorrt8 && cuda && libtorch implementation of rangenet++

License: MIT License

CMake 11.45% C++ 79.10% Shell 1.75% Roff 2.84% Cuda 4.86%
tensorrt semantic-segmentation libtorch cuda

rangenettrt8's Introduction

Natsu-Akatsuki's GitHub stats

rangenettrt8's People

Contributors

chen-xieyuanli avatar jbehley avatar kosmastsk avatar natsu-akatsuki avatar tano297 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rangenettrt8's Issues

How to install cuda 11.3 in ubuntu 22.04

Hello, and thank you for providing excellent code.

I'm currently trying to conduct tests on Ubuntu 22.04, and I have a question regarding the CUDA version, which is set to 11.3.
As of my knowledge cutoff date in January 2022, CUDA 11.3 was available up to Ubuntu 20.04.
I'm curious about how you installed version 11.3 on Ubuntu 22.04. Thank you.

速度问题请教

您好,请问您尝试过tensorrt加速过的rangenet++在Jetson AGX上的速度是多少fps吗?

数据异常和KNN后处理问题

大佬您好,我用自己的固态雷达数据训练的网络,深度图大小设置为128*1024,用python训练推理和使用KNN都没问题,但是用您的代码出现两个问题:
1.config->setFlag(nvinfer1::BuilderFlag::kFP16);设置为16时推理标签结果全为-1,我改为TF32后,情况好转,但仍有部分区域标签结果为-1,显示为黑的
微信图片_20231114165538

2.上诉结果是我在未开启KNN后处理的情况下得到的,我开启后处理 isPostprocess = true后推理报错如下:

[[11/14/2023-16:21:26] [I] I/O dimensions respectively are: [ 1 5 128 1024 ]
[11/14/2023-16:21:26] [I] I/O dimensions respectively are: [ 1 1 128 1024 ]
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [215,0,0], thread: [34,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [215,0,0], thread: [39,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [7,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [12,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [17,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [22,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [27,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [37,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [47,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [52,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [307,0,0], thread: [57,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [588,0,0], thread: [60,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
terminate called after throwing an instance of 'c10::CUDAError'
  what():  CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Exception raised from memcpy_and_sync at /pytorch/c10/cuda/CUDAFunctions.h:75 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x6b (0x7fd5a74940db in /home/nvidia/software/libtorch/lib/libc10.so)
frame #1: <unknown function> + 0x1479d72 (0x7fd5c45d2d72 in /home/nvidia/software/libtorch/lib/libtorch_cuda_cu.so)
frame #2: <unknown function> + 0x14179b5 (0x7fd607ea29b5 in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #3: at::native::copy_(at::Tensor&, at::Tensor const&, bool) + 0x4e (0x7fd607ea350e in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #4: at::_ops::copy_::call(at::Tensor&, at::Tensor const&, bool) + 0x179 (0x7fd60852ee79 in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #5: at::native::_to_copy(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, bool, c10::optional<c10::MemoryFormat>) + 0x145c (0x7fd60812457c in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #6: <unknown function> + 0x1f26533 (0x7fd6089b1533 in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #7: <unknown function> + 0x1dd8728 (0x7fd608863728 in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #8: at::_ops::_to_copy::redispatch(c10::DispatchKeySet, at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, bool, c10::optional<c10::MemoryFormat>) + 0x14a (0x7fd6083da78a in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #9: <unknown function> + 0x3465973 (0x7fd609ef0973 in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #10: <unknown function> + 0x3465e7b (0x7fd609ef0e7b in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #11: at::_ops::_to_copy::call(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, bool, c10::optional<c10::MemoryFormat>) + 0x1ea (0x7fd6084577da in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #12: at::native::to(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, bool, bool, c10::optional<c10::MemoryFormat>) + 0x17e (0x7fd608122c1e in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #13: <unknown function> + 0x1fc9599 (0x7fd608a54599 in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #14: at::_ops::to_dtype_layout::call(at::Tensor const&, c10::optional<c10::ScalarType>, c10::optional<c10::Layout>, c10::optional<c10::Device>, c10::optional<bool>, bool, bool, c10::optional<c10::MemoryFormat>) + 0x20b (0x7fd608740f5b in /home/nvidia/software/libtorch/lib/libtorch_cpu.so)
frame #15: <unknown function> + 0x4ff7 (0x7fd68efa1ff7 in /home/nvidia/Lidar/rangenet/devel/lib/libpostprocess.so)
frame #16: Postprocess::postprocessKNN(float const*, float*, float const*, float const*, float const*, int, int*) + 0x14ba (0x7fd68efa3f5a in /home/nvidia/Lidar/rangenet/devel/lib/libpostprocess.so)
frame #17: rangenet::segmentation::NetTensorRT::doInfer(pcl::PointCloud<pcl::PointXYZI> const&, int*) + 0x4f9 (0x7fd68efd13d9 in /home/nvidia/Lidar/rangenet/devel/lib/librangenet_lib.so)
frame #18: <unknown function> + 0xb24f (0x563acf88024f in /home/nvidia/Lidar/rangenet/devel/lib/rangenet_pp/ros1_demo)
frame #19: <unknown function> + 0x13402 (0x563acf888402 in /home/nvidia/Lidar/rangenet/devel/lib/rangenet_pp/ros1_demo)
frame #20: <unknown function> + 0x1546d (0x563acf88a46d in /home/nvidia/Lidar/rangenet/devel/lib/rangenet_pp/ros1_demo)
frame #21: ros::SubscriptionQueue::call() + 0x989 (0x7fd68f1cc139 in /opt/ros/noetic/lib/libroscpp.so)
frame #22: ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) + 0x112 (0x7fd68f17a172 in /opt/ros/noetic/lib/libroscpp.so)
frame #23: ros::CallbackQueue::callAvailable(ros::WallDuration) + 0x323 (0x7fd68f17b883 in /opt/ros/noetic/lib/libroscpp.so)
frame #24: ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) + 0x5df (0x7fd68f1cefcf in /opt/ros/noetic/lib/libroscpp.so)
frame #25: ros::spin() + 0x2f (0x7fd68f1b721f in /opt/ros/noetic/lib/libroscpp.so)
frame #26: <unknown function> + 0xa0c5 (0x563acf87f0c5 in /home/nvidia/Lidar/rangenet/devel/lib/rangenet_pp/ros1_demo)
frame #27: __libc_start_main + 0xf3 (0x7fd5c2b8a083 in /lib/x86_64-linux-gnu/libc.so.6)
frame #28: <unknown function> + 0xa25e (0x563acf87f25e in /home/nvidia/Lidar/rangenet/devel/lib/rangenet_pp/ros1_demo)

[rangenet_pp-2] process has died [pid 15309, exit code -6, cmd /home/nvidia/Lidar/rangenet/devel/lib/rangenet_pp/ros1_demo __name:=rangenet_pp __log:=/home/nvidia/.ros/log/c9cdd400-82c6-11ee-ab8b-2159e06240c5/rangenet_pp-2.log].
log file: /home/nvidia/.ros/log/c9cdd400-82c6-11ee-ab8b-2159e06240c5/rangenet_pp-2*.log]

想问大佬有什么建议或思路吗

modify the code applicable to Ouster64 data

Hello,
Thank you very much for the open source!

I tried to directly use the pre-trained model provided by lidar-bonnetal to segment the data collected by ouster64. The segmentation results were very strange. How can I modify the code to make it applicable to ouster64 data?

Linking Problems While Building

Hi, thank u for your work. I'm trying to build your repo on Nvidia agx xavier , when I do catkin_make in my workspace , I get errors at linking section as below;

Any advice?
OS: Ubuntu 20.04
CUDA: 11.4
Tensorrt: 8.2

Base path: /root/Workspace/range_ws
Source space: /root/Workspace/range_ws/src
Build space: /root/Workspace/range_ws/build
Devel space: /root/Workspace/range_ws/devel
Install space: /root/Workspace/range_ws/install

Running command: "make cmake_check_build_system" in "/root/Workspace/range_ws/build"

-- Using CATKIN_DEVEL_PREFIX: /root/Workspace/range_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /root/Workspace/range_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10")
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - rangenet_pp
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'rangenet_pp'
-- ==> add_subdirectory(RangeNetTrt8)
-- [INFO] CMAKE_BUILD_TYPE:
-- [INFO] ROS1 is available!
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Warning at /usr/local/lib/python3.8/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/usr/local/lib/python3.8/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
RangeNetTrt8/cmake/ThirdParty.cmake:5 (find_package)
RangeNetTrt8/CMakeLists.txt:26 (include)

-- Eigen found (include: /usr/include/eigen3, version: 3.3.7)
-- The imported target "vtkParseOGLExt" references the file
"/usr/bin/vtkParseOGLExt-7.1"
but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.
  • An install or uninstall procedure did not complete successfully.
  • The installation package was faulty and contained
    "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
    but not all the files it references.

-- The imported target "vtkRenderingPythonTkWidgets" references the file
"/usr/lib/aarch64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.
  • An install or uninstall procedure did not complete successfully.
  • The installation package was faulty and contained
    "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
    but not all the files it references.

-- The imported target "vtk" references the file
"/usr/bin/vtk"
but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.
  • An install or uninstall procedure did not complete successfully.
  • The installation package was faulty and contained
    "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
    but not all the files it references.

-- The imported target "pvtk" references the file
"/usr/bin/pvtk"
but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.
  • An install or uninstall procedure did not complete successfully.
  • The installation package was faulty and contained
    "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
    but not all the files it references.

-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so)
-- QHULL found (include: /usr/include, lib: optimized;/usr/lib/aarch64-linux-gnu/libqhull.so;debug;/usr/lib/aarch64-linux-gnu/libqhull.so)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- [INFO] PCL_VERSION is 1.10.0
-- [INFO] CUDA is available!
-- [INFO] CUDA Libs: /usr/local/cuda-11.4/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/aarch64-linux-gnu/librt.so
-- [INFO] CUDA Headers: /usr/local/cuda-11.4/include
-- [INFO] CUDNN is available!
-- [INFO] CUDNN_LIBRARY: /usr/lib/aarch64-linux-gnu/libcudnn.so
-- [INFO] NVINFER: /usr/lib/aarch64-linux-gnu/libnvinfer.so
-- [INFO] NVPARSERS: /usr/lib/aarch64-linux-gnu/libnvparsers.so
-- [INFO] NVINFER_PLUGIN: /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so
-- [INFO] NVONNX_PARSER: /usr/lib/aarch64-linux-gnu/libnvonnxparser.so
-- [INFO] TensorRT is available!
-- Configuring done
-- Generating done
-- Build files have been written to: /root/Workspace/range_ws/build

Running command: "make -j4 -l4" in "/root/Workspace/range_ws/build"

[ 7%] Building NVCC (Device) object RangeNetTrt8/CMakeFiles/project_ops.dir/src/ops/project_ops_generated_project_kernel.cu.o
[ 14%] Building CXX object RangeNetTrt8/CMakeFiles/pointcloud_io.dir/src/utils/pointcloud_io.cpp.o
: warning: ISO C++11 requires whitespace after the macro name
[ 21%] Building CXX object RangeNetTrt8/CMakeFiles/postprocess.dir/src/utils/postprocess.cpp.o
: warning: ISO C++11 requires whitespace after the macro name
: warning: ISO C++11 requires whitespace after the macro name
[ 28%] Linking CXX shared library /root/Workspace/range_ws/devel/lib/libpointcloud_io.so
: warning: ISO C++11 requires whitespace after the macro name
Scanning dependencies of target project_ops
[ 35%] Building CXX object RangeNetTrt8/CMakeFiles/project_ops.dir/src/ops/project.cpp.o
[ 42%] Linking CXX shared library /root/Workspace/range_ws/devel/lib/libpostprocess.so
[ 42%] Built target postprocess
[ 50%] Linking CXX shared library /root/Workspace/range_ws/devel/lib/libproject_ops.so
[ 50%] Built target project_ops
[ 50%] Built target pointcloud_io
Scanning dependencies of target rangenet_lib
[ 57%] Building CXX object RangeNetTrt8/CMakeFiles/rangenet_lib.dir/src/network/net.cpp.o
[ 64%] Building CXX object RangeNetTrt8/CMakeFiles/rangenet_lib.dir/src/network/netTensorRT.cpp.o
[ 71%] Linking CXX shared library /root/Workspace/range_ws/devel/lib/librangenet_lib.so
[ 71%] Built target rangenet_lib
Scanning dependencies of target demo
Scanning dependencies of target ros1_demo
[ 78%] Building CXX object RangeNetTrt8/CMakeFiles/ros1_demo.dir/src/ros1_demo.cpp.o
[ 85%] Building CXX object RangeNetTrt8/CMakeFiles/demo.dir/src/demo.cpp.o
[ 92%] Linking CXX executable /root/Workspace/range_ws/devel/lib/rangenet_pp/ros1_demo
[100%] Linking CXX executable /root/Workspace/range_ws/devel/lib/rangenet_pp/demo
/usr/bin/ld: CMakeFiles/ros1_demo.dir/src/ros1_demo.cpp.o: in function ROS_DEMO::ROS_DEMO(ros::NodeHandle*)': ros1_demo.cpp:(.text+0xe18): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: CMakeFiles/ros1_demo.dir/src/ros1_demo.cpp.o: in function ROS_DEMO::pointcloudCallback(boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> const&)': ros1_demo.cpp:(.text+0x1c68): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: CMakeFiles/ros1_demo.dir/src/ros1_demo.cpp.o: in function main': ros1_demo.cpp:(.text.startup+0x5c): undefined reference to ros::init(int&, char**, std::string const&, unsigned int)'
/usr/bin/ld: ros1_demo.cpp:(.text.startup+0xac): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: CMakeFiles/ros1_demo.dir/src/ros1_demo.cpp.o: in function ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&)':
ros1_demo.cpp:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs12PointCloud2_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11sensor_msgs12PointCloud2_ISaIvEEEEEvE11deserializeERKNS_43SubscriptionCallbackHelperDeserializeParamsE]+0x9b8): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to pcl::visualization::PCLVisualizer::addCoordinateSystem(double, std::string const&, int)'
/usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to YAML::detail::node_data::empty_scalar' /usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::string const&, int)'
/usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to pcl::visualization::PCLVisualizer::PCLVisualizer(std::string const&, bool)' /usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to YAML::LoadFile(std::string const&)'
/usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to YAML::detail::node_data::set_scalar(std::string const&)' collect2: error: ld returned 1 exit status make[2]: *** [RangeNetTrt8/CMakeFiles/ros1_demo.dir/build.make:538: /root/Workspace/range_ws/devel/lib/rangenet_pp/ros1_demo] Error 1 make[1]: *** [CMakeFiles/Makefile2:605: RangeNetTrt8/CMakeFiles/ros1_demo.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /usr/bin/ld: CMakeFiles/demo.dir/src/demo.cpp.o: in function YAML::detail::node& YAML::detail::node_data::getstd::string(std::string const&, std::shared_ptrYAML::detail::memory_holder)':
demo.cpp:(.text._ZN4YAML6detail9node_data3getISsEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getISsEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x2d8): undefined reference to YAML::detail::node_data::set_scalar(std::string const&)' /usr/bin/ld: CMakeFiles/demo.dir/src/demo.cpp.o: in function main':
demo.cpp:(.text.startup+0x140): undefined reference to YAML::LoadFile(std::string const&)' /usr/bin/ld: demo.cpp:(.text.startup+0x3a0): undefined reference to pcl::PCDReader::read(std::string const&, pcl::PCLPointCloud2&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int)'
/usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to pcl::visualization::PCLVisualizer::addCoordinateSystem(double, std::string const&, int)' /usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to YAML::detail::node_data::empty_scalar'
/usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::string const&, int)' /usr/bin/ld: /root/Workspace/range_ws/devel/lib/librangenet_lib.so: undefined reference to pcl::visualization::PCLVisualizer::PCLVisualizer(std::string const&, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [RangeNetTrt8/CMakeFiles/demo.dir/build.make:456: /root/Workspace/range_ws/devel/lib/rangenet_pp/demo] Error 1
make[1]: *** [CMakeFiles/Makefile2:494: RangeNetTrt8/CMakeFiles/demo.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j4 -l4" failed

推理速度问题

您好,感谢您的工作。最近我在我电脑上测试这个工程(RTX3000+128G内存)。我看README.md中表示,速度应该在6ms左右,但我电脑上测试single_shot_demo结果是500ms。想问下这个速度正常吗?

Segmentation fault Error

First of all, thank you for the good code.
Running the robag file works very well, but running ./demo to segment the pcd file causes the following error.
Do you know the solution?

My current environment is as follows.
cuda: 11.8
cudnn: 8.6.0
tensorrt: 8.6.0.12

Screenshot from 2024-02-05 18-13-49

运行效果问题请教

环境:ubuntu18.04, 其余cuda、cudnn、tesorrt与推荐相同
修改处:
1.将
#include <pcl/io/pcd_io.h>
改为了
#include <pcl/point_cloud.h>
#include
2.由于infer.cpp报error:loadPCDfile非pcl成员,将infer删除后编译完成

问题:
1.在ROS下正确的运行效果是在rviz中生成连续的语义分割点云吗?我在自己电脑上运行两个launch文件后rviz无输出,弹出3D_viewer窗口显示单帧语义点云,关闭后又显示下一帧语义点云。
2.infer.cpp是否是该项目必须文件?是否有解决pcl报错的方法?

感恩~

更改模型复现推理框架遇到的问题

hello 作者您好, 我能成功运行你的推理框架复现结果,效果极佳,推理速度也很快. 我试着去更改bag包和模型文件,遇到了以下几个问题,希望得到你的帮助,感谢:

  1. 我以你提供的onnx文件为输入, 用trtexec生成engine文件去推理,无法推理成功,提示terminate called after throwing an instance of 'c10::CUDAError' what(): CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. 其他代码未作改动,我猜可能是和作者导模型的方式不一致,比如作者在网络结尾做的一些操作.

  2. 我试着去替换另外一个网络Salsanext进行推理, 该网络也是基于投影做的语义分割,前后处理和rangenet++一致,我更改了bag包以及一些fov参数信息. 在netTensorRT.cpp中 ,我做了如下修改 int start = 88;int end = 90;auto layer = network->getLayer(91);//这里我做了修改 最后一层是salsanext的91层 , 能跑通整个流程,打印出推理时间. 但是我试着用rviz去看结果的时候,分割结果是只有一个label信息(或者两个,有些闪烁的点). 我把推理的label和point打印出来看,发现推理的几个label是和bag包吻合的. 但是rviz结果不对,用trtexec导出的engine文件无法推理.

希望得到您的帮助,感谢.

onnx转trt

大佬您好,我看您在onnx转trt的时候有不同层的权值类型设置,这个应该是基于您自己的带有CRF的darknet53网络模型,我想问下如果我的darknet53网络模型不带CRF,应该怎么设置呢,我直接暴力的把这里注释掉后,效果会非常差,求指教
2023-10-25 11-21-27屏幕截图

编译报错

您好,我编译的过程中出现了这样的错误

Errors << rangenet_plusplus:cmake /home/yy/catkin_ws1/logs/rangenet_plusplus/build.cmake.000.log
CMake Error at /home/yy/catkin_ws1/src/RangeNetTrt8/CMakeLists.txt:37 (find_package):
By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Torch", but
CMake did not find one.

Could not find a package configuration file provided by "Torch" with any of
the following names:

TorchConfig.cmake
torch-config.cmake

Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
"Torch_DIR" to a directory containing one of the above files. If "Torch"
provides a separate development package or SDK, be sure it has been
installed.

我已经在CMakeLists中修改了libtorch的路径,以下是我CMakeLists中的内容,我是直接按照命令行把libtorch解压到了主目录下

导入第三方库

set(Torch_DIR "$ENV{HOME}/home/yy/libtorch/share/cmake/Torch")
find_package(Torch REQUIRED)
find_package(OpenCV REQUIRED)
find_package(PCL REQUIRED QUIET)
find_package(yaml-cpp REQUIRED)
include_directories(${PCL_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${TORCH_INCLUDE_DIRS}
${YAML_CPP_INCLUDE_DIR})

请问这个问题怎么解决,非常感谢

自己训练的rangenet++转trt,分割结果全是错误的

您好,首先感谢您的代码,让我收益颇多!
我用自己的数据重新训练了rangenet++网络,用的darknet主干网络。用您仓库的代码进行部署时,分割结果全是错的。
我把输入trt和trt的输出结果都打印出来看了一下,输入的数据没问题,但是trt的输出结果并不是整数索引,是1.68156e-44这样接近于0的数值,思考了很久没有找到原因,大佬有没有什么建议?期待您的回复,非常感谢!

rangenet.launch运行报错问题

我的配置是ubuntu20.04,GTX950M,CUDA11.3 CUDNN8.8.0 tensorrt8.4.1.5 libtorch1.10
编译正常,跑rosbag.launch也没问题,但是跑rangenet.launch时报以下错误:
[07/28/2023-10:51:11] [W] - Subnormal FP16 values detected.
[07/28/2023-10:51:11] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[07/28/2023-10:51:11] [W] Weights [name=node_of_582 + node_of_583.weight] had the following issues when converted to FP16:
[07/28/2023-10:51:11] [W] - Subnormal FP16 values detected.
[07/28/2023-10:51:11] [W] - Values less than smallest positive FP16 Subnormal value detected. Converting to FP16 minimum subnormalized value.
[07/28/2023-10:51:11] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[07/28/2023-10:51:11] [W] Weights [name=node_of_585 + node_of_586.weight] had the following issues when converted to FP16:
[07/28/2023-10:51:11] [W] - Subnormal FP16 values detected.
[07/28/2023-10:51:11] [W] - Values less than smallest positive FP16 Subnormal value detected. Converting to FP16 minimum subnormalized value.
[07/28/2023-10:51:11] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[07/28/2023-10:51:11] [W] Weights [name=node_of_585 + node_of_586.bias] had the following issues when converted to FP16:
[07/28/2023-10:51:11] [W] - Subnormal FP16 values detected.
[07/28/2023-10:51:11] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[07/28/2023-10:51:22] [E] 1: [wrapper.cpp::plainGemm::206] Error Code 1: Cublas (CUBLAS_STATUS_NOT_SUPPORTED)
[07/28/2023-10:51:22] [E] 2: [builder.cpp::buildSerializedNetwork::636] Error Code 2: Internal Error (Assertion engine != nullptr failed. )
terminate called after throwing an instance of 'std::runtime_error'
what(): failed to build tensorrt engine
[ros1_demo-2] process has died [pid 98179, exit code -6, cmd /home/liangyuyao/Lidar/rangetnet_pp/devel/lib/rangenet_pp/ros1_demo __name:=ros1_demo __log:=/home/liangyuyao/.ros/log/5d531702-2cf1-11ee-ba9b-bdc9299ca300/ros1_demo-2.log].
log file: /home/liangyuyao/.ros/log/5d531702-2cf1-11ee-ba9b-bdc9299ca300/ros1_demo-2*.log

请问怎么解决呢。我的launch文件的model_dir也已经进行了对应的修改

问题请教

感谢您的分享!
我在编译时出现了以下的错误:(我采用的是cuda11.1版本,请问如何在不修改版本的情况下解决这个问题呢?)
Errors << rangenet_plusplus:make /home/llz/catkin_RNT/logs/rangenet_plusplus/build.make.000.log
: warning: ISO C++11 requires whitespace after the macro name
: warning: ISO C++11 requires whitespace after the macro name
: warning: ISO C++11 requires whitespace after the macro name
/home/llz/catkin_RNT/src/RangeNetTrt8/ops/project_kernel.cu(3): error: A device variable cannot be marked constexpr

/home/llz/catkin_RNT/src/RangeNetTrt8/ops/project_kernel.cu(4): error: A device variable cannot be marked constexpr

2 errors detected in the compilation of "/home/llz/catkin_RNT/src/RangeNetTrt8/ops/project_kernel.cu".
CMake Error at project_ops_generated_project_kernel.cu.o.RELEASE.cmake:283 (message):
Error generating file
/home/llz/catkin_RNT/build/rangenet_plusplus/CMakeFiles/project_ops.dir/ops/./project_ops_generated_project_kernel.cu.o

几个问题

非常感谢共享

1、TensorRT 版本
nvinfer1::BuilderFlag::kPREFER_PRECISION_CONSTRAINTS 在8.2.3.0版本中有定义 8.0.0.3中没有
2、onnx 模型下载路径
http://www.ipb.uni-bonn.de/html/projects/bonnetal/lidar/semantic/predictions/darknet53.tar.gz 是数据 不是模型地址
3、执行出错

Setting verbosity to: false
Trying to open model
read engine file /home/qkj/projects/auto_driving/catkin_ws/RangeNetTrt8/model/darknet53/model.trt failed
Could not deserialize TensorRT engine.
Generating from sratch... This may take a while...
Trying to serialize engine and save to : /home/qkj/projects/auto_driving/catkin_ws/RangeNetTrt8/model/darknet53/model.trt for next run
Segmentation fault (core dumped)

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.