yolov11-tensorrt
yolov11-tensorrt copied to clipboard
Is TensorRT 10.7 + cuDNN 9.6 + CUDA 12.6 + OpenCV 5.0.0-Alpha are supported?
I have the following setup: Windows 10 Project using C++ implementations. cuDNN 9.6 CUDA 12.6 TensorRT 10.7 ONNX Runtime 1.20.0 OpenCV 5.0.0-Alpha CMake 3.30
Getting errors:
F:\AI_Componets\yolov11-tensorrt>mkdir build && cd build
F:\AI_Componets\yolov11-tensorrt\build>cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.42.34435.0
-- The CXX compiler identification is MSVC 19.42.34435.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: F:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: F:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:4 (find_package):
Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake
--help-policy CMP0146" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found CUDA: F:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6 (found version "12.6")
-- OpenCV ARCH: x64
-- OpenCV RUNTIME: vc17
-- OpenCV STATIC: OFF
-- Found OpenCV: F:/AI_Componets/OpenCV/build/install (found version "5.0.0")
-- Found OpenCV 5.0.0 in F:/AI_Componets/OpenCV/build/install/x64/vc17/lib
-- You might need to add F:\AI_Componets\OpenCV\build\install\x64\vc17\bin to your PATH to be able to run your applications.
-- Configuring done (21.0s)
-- Generating done (0.2s)
-- Build files have been written to: F:/AI_Componets/yolov11-tensorrt/build
F:\AI_Componets\yolov11-tensorrt\build>cmake --build . --config Release
MSBuild version 17.12.12+1cce77968 for .NET Framework
1>Checking Build System
Building NVCC (Device) object CMakeFiles/yolov11-tensorrt.dir/src/Release/yolov11-tensorrt_generated_preprocess.cu.obj
preprocess.cu
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/warpers.hpp(227): warning #611-D: overloaded virtual function "cv::detail::PlaneWarper::buildMaps" is only partially overridden in cla
ss "cv::detail::AffineWarper" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class AffineWarper : public PlaneWarper
^
Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/warpers.hpp(227): warning #611-D: overloaded virtual function "cv::detail::PlaneWarper::warp" is only partially overridden in class "c
v::detail::AffineWarper" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class AffineWarper : public PlaneWarper
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/matchers.hpp(182): warning #611-D: overloaded virtual function "cv::detail::FeaturesMatcher::match" is only partially overridden in cl
ass "cv::detail::BestOf2NearestMatcher" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class BestOf2NearestMatcher : public FeaturesMatcher
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/matchers.hpp(236): warning #611-D: overloaded virtual function "cv::detail::FeaturesMatcher::match" is only partially overridden in cl
ass "cv::detail::AffineBestOf2NearestMatcher" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class AffineBestOf2NearestMatcher : public BestOf2NearestMatcher
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/blenders.hpp(100): warning #611-D: overloaded virtual function "cv::detail::Blender::prepare" is only partially overridden in class "c
v::detail::FeatherBlender" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class FeatherBlender : public Blender
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/blenders.hpp(127): warning #611-D: overloaded virtual function "cv::detail::Blender::prepare" is only partially overridden in class "c
v::detail::MultiBandBlender" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class MultiBandBlender : public Blender
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/warpers.hpp(227): warning #611-D: overloaded virtual function "cv::detail::PlaneWarper::buildMaps" is only partially overridden in cla
ss "cv::detail::AffineWarper" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class AffineWarper : public PlaneWarper
^
Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/warpers.hpp(227): warning #611-D: overloaded virtual function "cv::detail::PlaneWarper::warp" is only partially overridden in class "c
v::detail::AffineWarper" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class AffineWarper : public PlaneWarper
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/matchers.hpp(182): warning #611-D: overloaded virtual function "cv::detail::FeaturesMatcher::match" is only partially overridden in cl
ass "cv::detail::BestOf2NearestMatcher" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class BestOf2NearestMatcher : public FeaturesMatcher
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/matchers.hpp(236): warning #611-D: overloaded virtual function "cv::detail::FeaturesMatcher::match" is only partially overridden in cl
ass "cv::detail::AffineBestOf2NearestMatcher" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class AffineBestOf2NearestMatcher : public BestOf2NearestMatcher
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/blenders.hpp(100): warning #611-D: overloaded virtual function "cv::detail::Blender::prepare" is only partially overridden in class "c
v::detail::FeatherBlender" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class FeatherBlender : public Blender
^
F:/AI_Componets/OpenCV/build/install/include\opencv2/stitching/detail/blenders.hpp(127): warning #611-D: overloaded virtual function "cv::detail::Blender::prepare" is only partially overridden in class "c
v::detail::MultiBandBlender" [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
class MultiBandBlender : public Blender
^
preprocess.cu
tmpxft_00004618_00000000-10_preprocess.cudafe1.cpp
F:\AI_Componets\yolov11-tensorrt\src\preprocess.cu(113): warning C4244: '=': conversion from 'double' to 'float', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\preprocess.cu(116): warning C4244: '=': conversion from 'double' to 'float', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\preprocess.cu(126): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcx
proj]
Building Custom Rule F:/AI_Componets/yolov11-tensorrt/CMakeLists.txt
CMake is re-running because F:/AI_Componets/yolov11-tensorrt/build/CMakeFiles/generate.stamp is out-of-date.
the file 'F:/AI_Componets/yolov11-tensorrt/build/CMakeFiles/yolov11-tensorrt.dir/src/yolov11-tensorrt_generated_preprocess.cu.obj.depend'
is newer than 'F:/AI_Componets/yolov11-tensorrt/build/CMakeFiles/generate.stamp.depend'
result='-1'
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
CMake Warning (dev) at CMakeLists.txt:4 (find_package):
Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake
--help-policy CMP0146" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- OpenCV ARCH: x64
-- OpenCV RUNTIME: vc17
-- OpenCV STATIC: OFF
-- Found OpenCV 5.0.0 in F:/AI_Componets/OpenCV/build/install/x64/vc17/lib
-- You might need to add F:\AI_Componets\OpenCV\build\install\x64\vc17\bin to your PATH to be able to run your applications.
-- Configuring done (0.6s)
-- Generating done (0.5s)
-- Build files have been written to: F:/AI_Componets/yolov11-tensorrt/build
main.cpp
YOLOv11.cpp
Generating Code...
F:\AI_Componets\yolov11-tensorrt\src\logging.h(74,33): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_W
ARNINGS. See online help for details. [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
(compiling source file '../src/YOLOv11.cpp')
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(38,29): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(39,29): warning C4244: '=': conversion from 'int64_t' to 'int', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(61,23): error C2039: 'getBindingDimensions': is not a member of 'nvinfer1::ICudaEngine' [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\TensorRT\TensorRT-10.7.0.23\include\NvInferRuntime.h(3001,7):
see declaration of 'nvinfer1::ICudaEngine'
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(62,23): error C2039: 'getBindingDimensions': is not a member of 'nvinfer1::ICudaEngine' [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\TensorRT\TensorRT-10.7.0.23\include\NvInferRuntime.h(3001,7):
see declaration of 'nvinfer1::ICudaEngine'
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(63,40): error C2039: 'getBindingDimensions': is not a member of 'nvinfer1::ICudaEngine' [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\TensorRT\TensorRT-10.7.0.23\include\NvInferRuntime.h(3001,7):
see declaration of 'nvinfer1::ICudaEngine'
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(64,30): error C2039: 'getBindingDimensions': is not a member of 'nvinfer1::ICudaEngine' [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\TensorRT\TensorRT-10.7.0.23\include\NvInferRuntime.h(3001,7):
see declaration of 'nvinfer1::ICudaEngine'
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(148,35): warning C4244: 'argument': conversion from 'double' to '_Ty', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxpr
oj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(148,35): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(148,35): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(148,35): warning C4244: _Ty=float [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(148,35): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(239,27): warning C4244: '=': conversion from 'float' to '_Tp', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(239,27): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(239,27): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(239,27): warning C4244: _Tp=int [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(239,27): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(240,68): warning C4244: '=': conversion from 'float' to '_Tp', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(240,68): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(240,68): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(240,68): warning C4244: _Tp=int [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(240,68): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(241,35): warning C4244: '=': conversion from 'float' to '_Tp', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(241,35): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(241,35): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(241,35): warning C4244: _Tp=int [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(241,35): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(242,37): warning C4244: '=': conversion from 'float' to '_Tp', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(242,37): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(242,37): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(242,37): warning C4244: _Tp=int [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(242,37): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(246,68): warning C4244: '=': conversion from 'float' to '_Tp', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(246,68): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(246,68): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(246,68): warning C4244: _Tp=int [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(246,68): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(247,27): warning C4244: '=': conversion from 'float' to '_Tp', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(247,27): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(247,27): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(247,27): warning C4244: _Tp=int [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(247,27): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(248,35): warning C4244: '=': conversion from 'float' to '_Tp', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(248,35): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(248,35): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(248,35): warning C4244: _Tp=int [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(248,35): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(249,37): warning C4244: '=': conversion from 'float' to '_Tp', possible loss of data [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(249,37): warning C4244: with [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(249,37): warning C4244: [ [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(249,37): warning C4244: _Tp=int [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
F:\AI_Componets\yolov11-tensorrt\src\YOLOv11.cpp(249,37): warning C4244: ] [F:\AI_Componets\yolov11-tensorrt\build\yolov11-tensorrt.vcxproj]
Thanks for any help.
The getBindingDimensions method is not available in TensorRT 10.7. This method was deprecated in after TensorRT 10.3. Would be nice if the code can be updated for TensorRT 10.7.
Thanks.