jason-li-831202/YOLO-NAS-onnxruntime

Help me with implementing this project.

Sumeshbaba opened this issue · 8 comments

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!

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

Sorry, i can't see image.

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

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

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.