zerollzeng / tensorrt-zoo

openpose, yolov3 with tiny-tensorrt
86 stars 25 forks source link

How do I install this project in Windows #40

Open zhanghongyong123456 opened 3 years ago

zhanghongyong123456 commented 3 years ago

want to compile under Windows, but I am not familiar with Cmake. Could you briefly explain the compile process and how to configure Cmake? Thank you,windows10.1 python 3.8 cuda 10.2 TensorRT 7.2.1.6 opencv 4.5.1 cmake GUI 3.19.2

thank you very much for your help

zhanghongyong123456 commented 3 years ago

want to compile under Windows, but I am not familiar with Cmake. Could you briefly explain the compile process and how to configure Cmake? Thank you,windows10.1 python 3.8 cuda 10.2 TensorRT 7.2.1.6 opencv 4.5.1 cmake GUI 3.19.2

thank you very much for your help

I got this problem at compile time 31 When I remove the -d identifier 32 33

zerollzeng commented 3 years ago

Sry I don't familiar with windows platform so can not help you with this :(

drostifrosti commented 3 years ago

you pass CMake variables with -D<var>=<value> without a space between D and <, that's why I suggested to read a tutorial beforehand. If you're on Windows, why don't you use the more comfortable GUI to configure the variables? Regarding the errors: you can use my forks of @zerollzeng repos (which exclude parts of his work, which I didn't need in my personal project)

zhanghongyong123456 commented 3 years ago

you pass CMake variables with -D<var>=<value> without a space between D and <, that's why I suggested to read a tutorial beforehand. If you're on Windows, why don't you use the more comfortable GUI to configure the variables? Regarding the errors: you can use my forks of @zerollzeng repos (which exclude parts of his work, which I didn't need in my personal project) I find that your personal innovation pool is no different from this one,I have solved -d. I don't know how to set parameters for the second problem. I hope you can give me some advice https://github.com/drostifrosti/tensorrt-zoo

zhanghongyong123456 commented 3 years ago

you pass CMake variables with -D<var>=<value> without a space between D and <, that's why I suggested to read a tutorial beforehand. If you're on Windows, why don't you use the more comfortable GUI to configure the variables? Regarding the errors: you can use my forks of @zerollzeng repos (which exclude parts of his work, which I didn't need in my personal project) When I was using your library to install,I also have Boost1.76 installed image

drostifrosti commented 3 years ago

I find that your personal innovation pool is no different from this one <

I can assure you, I got it to work under Windows with these changes. You have to point the variable CUDART to the path of the cudart.lib library

PS: can you please exclude your answer from the quote block

zhanghongyong123456 commented 3 years ago

I find that your personal innovation pool is no different from this one <

I can assure you, I got it to work under Windows with these changes. You have to point the variable CUDART to the path of the cudart.lib library

PS: can you please exclude your answer from the quote block

Hello I use Cmake GUI configuration.I have respecified your path, and I have installed boost1.76 version. I want to know how your cmake is configured, could you please tell me image Thank you very much for your reply

zhanghongyong123456 commented 3 years ago

I find that your personal innovation pool is no different from this one <

I can assure you, I got it to work under Windows with these changes. You have to point the variable CUDART to the path of the cudart.lib library

PS: can you please exclude your answer from the quote block I'm sorry, I was wondering which one that was, PS: can you please exclude your answer from the quote block

drostifrosti commented 3 years ago

There is no shortcut to configure the CMake script, I've got local paths in my CMake configuration which are of no help to you. You're on the right track, just keep going.

zhanghongyong123456 commented 3 years ago

There is no shortcut to configure the CMake script, I've got local paths in my CMake configuration which are of no help to you. You're on the right track, just keep going.

Now I don't know which parameters need to be configured. The main reason is to know which parameters you have configured, and I can easily find my own path according to your configuration,Looking forward to your reply

drostifrosti commented 3 years ago

for tensorrt-zoo:

BUILD_PYTHON OFF BUILD_TEST OFF ENABLE_PRELU_FP16 ON SM_VERSION 86 TENSORRT_INCLUDE_DIR <local path>\TensorRT-7.2.2.3\include TENSORRT_ROOT <local path>\TensorRT-7.2.2.3 OpenCV_DIR <local path>\OpenCV_4.5.1\install\x64\vc16\lib

zhanghongyong123456 commented 3 years ago

OpenCV_DIR

yes,I configured all of that, but for how to configure the subdirectory cmakelist.txt(openpose) image I'm not sure that's right

zhanghongyong123456 commented 3 years ago

OpenCV_DIR

yes,I configured all of that, but for how to configure the subdirectory cmakelist.txt(openpose) image I'm not sure that's right Because when I cmake configure, I get this message image

drostifrosti commented 3 years ago

maybe your CMake version 3.19.2 is too old for this Boost version and preemptively throws this warning, I've got 1.75 and 3.20.4 and no warning no severe issue, more or less a note

zhanghongyong123456 commented 3 years ago

maybe your CMake version 3.19.2 is too old for this Boost version and preemptively throws this warning, I've got 1.75 and 3.20.4 and no warning no severe issue, more or less a note

Can I ignore this warning, then I can use VS 2019 directly ALL BUILD and INSTALL, or I can use cmake directly BUILD

drostifrosti commented 3 years ago

you can ignore this warning you just build the project in VS2019 directly or via ALL_BUILD

or I can use cmake directly BUILD

?

zhanghongyong123456 commented 3 years ago

you can ignore this warning you just build the project in VS2019 directly or via ALL_BUILD

or I can use cmake directly BUILD

? I used this command when compiling and installing the Opencv GPU, cmake --build "E:\opencvgpu\build6" --target INSTALL --config Release

zhanghongyong123456 commented 3 years ago

您可以忽略此警告, 您只需直接或通过 ALL_BUILD 在 VS2019 中构建项目

或者我可以直接使用 cmake 构建

? I want to know which file this needs to be commented in image

drostifrosti commented 3 years ago

already fixed here: https://github.com/drostifrosti/tiny-tensorrt/commit/b092efb7dad578c989257794ae3663e704e6f7bc

drostifrosti commented 3 years ago

您可以忽略此警告, 您只需直接或通过 ALL_BUILD 在 VS2019 中构建项目

或者我可以直接使用 cmake 构建

? I want to know which file this needs to be commented in

don't quite understand what you're asking for, maybe have a look here: https://github.com/drostifrosti/tiny-tensorrt/commit/cd7cda9598c3f6b7473de09ed9709975a759a8c7

zhanghongyong123456 commented 3 years ago

您可以忽略此警告, 您只需直接或通过 ALL_BUILD 在 VS2019 中构建项目

或者我可以直接使用 cmake 构建

? I want to know which file this needs to be commented in

don't quite understand what you're asking for, maybe have a look here: drostifrosti/tiny-tensorrt@cd7cda9

I updated cmake3.21.1 using your project file,Still failed to compile,This is the result of compilation. I don't know what to do output.txt

drostifrosti commented 3 years ago

Please mark the error lines, I'm not searching through 32k lines of output

zhanghongyong123456 commented 3 years ago

Please mark the error lines, I'm not searching through 32k lines of output

i am sorry,i run find out

zhanghongyong123456 commented 3 years ago

Please mark the error lines, I'm not searching through 32k lines of output I can't seem to find the file. I still have this problem when I copy the file I downloaded from the OpenPose distribution image

drostifrosti commented 3 years ago

I wanted to compare the performance of tensorrt-zoo's OpenPose to the original OpenPose, you could comment out the orig. OpenPose part OR put the complete OpenPose distribution somewhere and add an include directory to testopenpose in the CMake

zhanghongyong123456 commented 3 years ago

I wanted to compare the performance of tensorrt-zoo's OpenPose to the original OpenPose, you could comment out the orig. OpenPose part OR put the complete OpenPose distribution somewhere and add an include directory to testopenpose in the CMake

ok,I have a try

zhanghongyong123456 commented 3 years ago

I wanted to compare the performance of tensorrt-zoo's OpenPose to the original OpenPose, you could comment out the orig. OpenPose part OR put the complete OpenPose distribution somewhere and add an include directory to testopenpose in the CMake

ok,I have a try

I added this in the folder(F:\project\test02\tensorrt-zoo-master\openpose) cmakelists.txt, hope to point it out image

zhanghongyong123456 commented 3 years ago

I wanted to compare the performance of tensorrt-zoo's OpenPose to the original OpenPose, you could comment out the orig. OpenPose part OR put the complete OpenPose distribution somewhere and add an include directory to testopenpose in the CMake Sorry to bother you again, could you please take a look at your configuration, I wrote this seems not quite right, still reported the same error

drostifrosti commented 3 years ago

Which "same error" ?

zhanghongyong123456 commented 3 years ago

Which "same error" ? I wrote the wrong cmakelist.txt image

zhanghongyong123456 commented 3 years ago

Which "same error" ?

What I added seems wrong. Could you please give me an example? I am looking forward to your prompt reply

drostifrosti commented 3 years ago

use target_include_directories(testopenpose PRIVATE ".../include/openpose")

zhanghongyong123456 commented 3 years ago

use target_include_directories(testopenpose PRIVATE ".../include/openpose")

it doesn't work,F:\project\test03\tensorrt-zoo-master\openpose\testopenpose.cpp(23,14): fatal error C1083: Cannot open include file: 'openpose/flags.hpp': No such file or directory,

I'm not going to do the comparison, but using the second method, could you tell me if I don't compare the Openpose source code with tensorrt, which code I should comment, hopefully for a hint,thank you

zhanghongyong123456 commented 3 years ago

use target_include_directories(testopenpose PRIVATE ".../include/openpose")

Big guy can add a friend to give directions, configure several days also can't succeed,It's breaking down QQ 1037645638 ,Thank you so much

drostifrosti commented 3 years ago

it doesn't work,F:\project\test03\tensorrt-zoo-master\openpose\testopenpose.cpp(23,14): fatal error C1083: Cannot open include file: 'openpose/flags.hpp': No such file or directory

you have to replace the ... with your specific path look in the project properties in VS and check for include directories, which directory was included effectively

Big guy can add a friend to give directions, configure several days also can't succeed,It's breaking down QQ 1037645638 ,Thank you so much

?

zhanghongyong123456 commented 3 years ago

it doesn't work,F:\project\test03\tensorrt-zoo-master\openpose\testopenpose.cpp(23,14): fatal error C1083: Cannot open include file: 'openpose/flags.hpp': No such file or directory

you have to replace the ... with your specific path look in the project properties in VS and check for include directories, which directory was included effectively

Big guy can add a friend to give directions, configure several days also can't succeed,It's breaking down QQ 1037645638 ,Thank you so much

? Do I need to configure it in VS after I have configured the GUI in CMAK, image Hope to point out, the configuration of this has been four days, still did not succeed

zhanghongyong123456 commented 3 years ago

采用 target_include_directories(testopenpose PRIVATE ".../include/openpose") When I compile with cmake, there is only this error,Unable to find library without prompt,What to do about this error image

drostifrosti commented 3 years ago

You just check if the specified paths are correct in VS, but you don't have to post-configure anything in VS

I'm not going to do the comparison, but using the second method, could you tell me if I don't compare the Openpose source code with tensorrt, which code I should comment, hopefully for a hint,thank you

Comment out the OpenPose includes #include <openpose/flags.hpp>, #include <openpose/headers.hpp> and the whole function std::vector<std::vector<float>> openpose(int argc, char** argv)

When I compile with cmake, there is only this error,Unable to find library without prompt

You have to link against the nvcaffeparser.lib: https://github.com/drostifrosti/TensorRT

Hope to point out, the configuration of this has been four days, still did not succeed

I needed 2 weeks to port the whole library stack to Windows and compare the 2 versions of OpenPose, so keep going ;-)

zhanghongyong123456 commented 3 years ago

it doesn't work,F:\project\test03\tensorrt-zoo-master\openpose\testopenpose.cpp(23,14): fatal error C1083: Cannot open include file: 'openpose/flags.hpp': No such file or directory

you have to replace the ... with your specific path look in the project properties in VS and check for include directories, which directory was included effectively

Big guy can add a friend to give directions, configure several days also can't succeed,It's breaking down QQ 1037645638 ,Thank you so much

? Do I need to configure it in VS after I have configured the GUI in CMAK, image Hope to point out, the configuration of this has been four days, still did not succeed Hello, I would like to ask what I should do about this mistake. I am looking forward to your reply image

zhanghongyong123456 commented 3 years ago

You just check if the specified paths are correct in VS, but you don't have to post-configure anything in VS

I'm not going to do the comparison, but using the second method, could you tell me if I don't compare the Openpose source code with tensorrt, which code I should comment, hopefully for a hint,thank you

Comment out the OpenPose includes #include <openpose/flags.hpp>, #include <openpose/headers.hpp> and the whole function std::vector<std::vector<float>> openpose(int argc, char** argv)

When I compile with cmake, there is only this error,Unable to find library without prompt

You have to link against the nvcaffeparser.lib: https://github.com/drostifrosti/TensorRT

Hope to point out, the configuration of this has been four days, still did not succeed

I needed 2 weeks to port the whole library stack to Windows and compare the 2 versions of OpenPose, so keep going ;-)

Thank you for your encouragement

zhanghongyong123456 commented 3 years ago

You just check if the specified paths are correct in VS, but you don't have to post-configure anything in VS

I'm not going to do the comparison, but using the second method, could you tell me if I don't compare the Openpose source code with tensorrt, which code I should comment, hopefully for a hint,thank you

Comment out the OpenPose includes #include <openpose/flags.hpp>, #include <openpose/headers.hpp> and the whole function std::vector<std::vector<float>> openpose(int argc, char** argv)

When I compile with cmake, there is only this error,Unable to find library without prompt

You have to link against the nvcaffeparser.lib: https://github.com/drostifrosti/TensorRT

Hope to point out, the configuration of this has been four days, still did not succeed

I needed 2 weeks to port the whole library stack to Windows and compare the 2 versions of OpenPose, so keep going ;-)

Sorry to bother you again. I commented the source Openpose (according to your advice) and compiled it again. I found that I didn't have what you said lib(nvcaffeparser.lib),Below is my Tensorrt directory image this is CMakeLists.txt about tensorrt config, hope give me some advice,I'm not sure if my cmakelists.txt has a problem with the tensorrt modification or if the downloaded TensorRT is missing something(like you said nvcaffeparser.lib ) image

zhanghongyong123456 commented 3 years ago

You just check if the specified paths are correct in VS, but you don't have to post-configure anything in VS

I'm not going to do the comparison, but using the second method, could you tell me if I don't compare the Openpose source code with tensorrt, which code I should comment, hopefully for a hint,thank you

Comment out the OpenPose includes #include <openpose/flags.hpp>, #include <openpose/headers.hpp> and the whole function std::vector<std::vector<float>> openpose(int argc, char** argv)

When I compile with cmake, there is only this error,Unable to find library without prompt

You have to link against the nvcaffeparser.lib: https://github.com/drostifrosti/TensorRT

Hope to point out, the configuration of this has been four days, still did not succeed

I needed 2 weeks to port the whole library stack to Windows and compare the 2 versions of OpenPose, so keep going ;-)

Sorry to bother you again. I commented the source Openpose (according to your advice) and compiled it again. I found that I didn't have what you said lib(nvcaffeparser.lib),Below is my Tensorrt directory image this is CMakeLists.txt about tensorrt config, hope give me some advice,I'm not sure if my cmakelists.txt has a problem with the tensorrt modification or if the downloaded TensorRT is missing something(like you said nvcaffeparser.lib ) image

same error is this, image

drostifrosti commented 3 years ago

nvcaffeparser.lib is not included in the Windows download (who knows why), that's why you have to build it yourself, as always with modifications for Windows found in my repo

zhanghongyong123456 commented 3 years ago

nvcaffeparser.lib is not included in the Windows download (who knows why), that's why you have to build it yourself, as always with modifications for Windows found in my repo

  1. You mean that I need to build a TensorRT by myself instead of using the official Windows version.
  2. Source code compilation is based on your library(https://github.com/drostifrosti/TensorRT), or need to download the corresponding CUDA version of TensorRT official TensorRT(https://github.com/NVIDIA/TensorRT) to compile,my computer configuration RTX 2060 supper CUDA 10.2
  3. Did you make any changes to the tensorRT source code to fit this project,
drostifrosti commented 3 years ago
  1. yes, it suffices to build the nvcaffeparser.lib alone and put it in the already existing TensorRT install directory
  2. my fork consists of some minor modifications but otherwise it's the same repo
  3. yes, as I already mentioned
zhanghongyong123456 commented 3 years ago
  1. yes, it suffices to build the nvcaffeparser.lib alone and put it in the already existing TensorRT install directory
  2. my fork consists of some minor modifications but otherwise it's the same repo
  3. yes, as I already mentioned

Can I use your repo(https://github.com/drostifrosti/TensorRT) to compile nvCaffeineparser.lib?The TensorRT I used is tensorrt-7.2.1.6-CU10.2. I wonder if it matches your repo,Whether I can compile directly, there is no version problem

drostifrosti commented 3 years ago

If you took a quick look in the VERSION file in my repo, you could see that I forked 7.2.1.6 and again yes, you can take my repo to compile the lib.

zhanghongyong123456 commented 3 years ago

If you took a quick look in the VERSION file in my repo, you could see that I forked 7.2.1.6 and again yes, you can take my repo to compile the lib. Ok, thanks for your reply, my concern is that for 7.2.1.6, there are different CUDA versions (e.g. CUDA10.0 CUDA10.2 CUDA11.1), and suddenly I find Windows compilation too difficult

zhanghongyong123456 commented 3 years ago

If you took a quick look in the VERSION file in my repo, you could see that I forked 7.2.1.6 and again yes, you can take my repo to compile the lib. Ok, thanks for your reply, my concern is that for 7.2.1.6, there are different CUDA versions (e.g. CUDA10.0 CUDA10.2 CUDA11.1), and suddenly I find Windows compilation too difficult

sorry ,no cuda10.0, image

zhanghongyong123456 commented 3 years ago

If you took a quick look in the VERSION file in my repo, you could see that I forked 7.2.1.6 and again yes, you can take my repo to compile the lib.

Hello, I would like to know how to independently compile the nvcaffeparser.lib file. I checked the official website and did not find the tutorial compiled by myself in Windows,Blogs don't have this information either,Hope to give some advice