jason-li-831202 / YOLO-NAS-onnxruntime

This repo provides the C++ implementation of YOLO-NAS based on ONNXRuntime for performing object detection in real-time.Support float32/float16/int8 inference.
GNU General Public License v3.0
39 stars 7 forks source link

Help me with implementing this project. #8

Closed Sumeshbaba closed 1 month ago

Sumeshbaba commented 8 months ago

It seems like a really good project. But since I am a beginner in C++, I am not sure how to implement this.

When I try the CLI, it shows ./demo is not a internal or recognized command.

Could you please provide me with a step by step procedure? I am familiar with Pytorch implementation of YOLO-NAS and would like to compare both these implementations.

Thanks and have a great day!

jason-li-831202 commented 8 months ago

After the build process is complete, a 'build' folder will appear. You need to enter this folder before using the CLI.

Sumeshbaba commented 8 months ago

Hello KaiCun,

Really appreciate your prompt response.

Below I've attached a screenshot of the CLI. Could you tell me what I am doing wrong?

Really sorry to bother you.

Thanks and Regards. Sumesh [image: image.png]

On Fri, Dec 29, 2023 at 1:44 PM Kai Chun, Li @.***> wrote:

After the build process is complete, a 'build' folder will appear. You need to enter this folder before using the CLI.

— Reply to this email directly, view it on GitHub https://github.com/jason-li-831202/YOLO-NAS-onnxruntime/issues/8#issuecomment-1871745309, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUUVKEF5VMGZCDT6IHHCRNDYLZKC5AVCNFSM6AAAAABBGFYFJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRG42DKMZQHE . You are receiving this because you authored the thread.Message ID: @.***>

jason-li-831202 commented 8 months ago

Sorry, i can't see image.

Sumeshbaba commented 8 months ago

Hello,

Sorry, I must not have attached the screengrab. Below I've attached the same.

Thanks and regards. Sumesh

On Fri, 29 Dec, 2023, 16:05 Kai Chun, Li, @.***> wrote:

Sorry, i can't see image.

— Reply to this email directly, view it on GitHub https://github.com/jason-li-831202/YOLO-NAS-onnxruntime/issues/8#issuecomment-1871824508, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUUVKEGPR7AME5ODBYM7EQTYLZ2THAVCNFSM6AAAAABBGFYFJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRHAZDINJQHA . You are receiving this because you authored the thread.Message ID: @.***>

Sumeshbaba commented 8 months ago

Hello KaiChun, good afternoon.

Wish you a great year ahead!

Could you help me solve this issue I mentioned in the earlier email?

Thanks and regards. Sumesh

On Fri, Dec 29, 2023 at 4:22 PM Sumesh Nair @.***> wrote:

Hello,

Sorry, I must not have attached the screengrab. Below I've attached the same.

Thanks and regards. Sumesh

On Fri, 29 Dec, 2023, 16:05 Kai Chun, Li, @.***> wrote:

Sorry, i can't see image.

— Reply to this email directly, view it on GitHub https://github.com/jason-li-831202/YOLO-NAS-onnxruntime/issues/8#issuecomment-1871824508, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUUVKEGPR7AME5ODBYM7EQTYLZ2THAVCNFSM6AAAAABBGFYFJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRHAZDINJQHA . You are receiving this because you authored the thread.Message ID: @.***>

jason-li-831202 commented 8 months ago

you need to use this CLI "cd build" into folder after you run "./build.sh".

Sumeshbaba commented 8 months ago

Hello Jason, thanks a lot for the reply.

I followed the procedure as described in this repository, and at the step cmake --build . ,I get this error

(yolo_nas_onnx) D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\build>cmake --build . MSBuild version 17.8.3+195e7f5a3 for .NET Framework

1>Checking Build System Building Custom Rule D:/Sumesh/Caterpillar data/YOLO_NAS_CUSTOM_QAT/YOLO-NAS-onnxruntime-master/YOLO-NAS-onnxruntime- master/CMakeLists.txt main.cpp D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\include\cmdline. h(544,20): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data [D:\Sumesh\Caterpillar d ata\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\build\demo.vcxproj] (compiling source file '../src/main.cpp')

D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\include\detector .h(3,10): error C1083: Cannot open include file: 'onnxruntime_cxx_api.h': No such file or directory [D:\Sumesh\Caterpil lar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\build\demo.vcxproj] (compiling source file '../src/main.cpp')

detector.cpp D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\include\detector .h(3,10): error C1083: Cannot open include file: 'onnxruntime_cxx_api.h': No such file or directory [D:\Sumesh\Caterpil lar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\build\demo.vcxproj] (compiling source file '../src/detector.cpp')

utils.cpp D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\src\utils.cpp(28 ,14): error C2131: expression did not evaluate to a constant [D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-o nnxruntime-master\YOLO-NAS-onnxruntime-master\build\demo.vcxproj] D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\src\utils.cpp( 28,14): failure was caused by a read of a variable outside its lifetime D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\src\utils.cpp( 28,14): see usage of 'length'

D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\src\utils.cpp(34 ,39): error C2668: 'std::stoul': ambiguous call to overloaded function [D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\ YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\build\demo.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\string(308,45): could be 'unsigned long std::stoul(const std::wstring &,size_t ,int)' C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\string(132,45): or 'unsigned long std::stoul(const std::string &,size_t ,int)' D:\Sumesh\Caterpillar data\YOLO_NAS_CUSTOM_QAT\YOLO-NAS-onnxruntime-master\YOLO-NAS-onnxruntime-master\src\utils.cpp( 34,39): while trying to match the argument list '(char [length], nullptr, int)'

Generating Code...

Could you help me with this? I am not able to solve this

jason-li-831202 commented 6 months ago

Cannot open include file: 'onnxruntime_cxx_api.h' It seems that the path system of onnxruntime is not found, and then I suggest using Linux to implement it.