triple-Mu / YOLOv8-TensorRT

YOLOv8 using TensorRT accelerate !
MIT License
1.32k stars 228 forks source link

it is very terrible running on Windows #203

Open Dwinovo opened 6 months ago

Dwinovo commented 6 months ago

After I fixed a bunch of previous bugs with Cmake,i can not work it out :““unistd.h”: No such file or directory ”,Although I tried using io.h instead,and modify some variable but it didnot work. emmmm maybe because i am a noob

Dwinovo commented 6 months ago

hi guys,i have work out all the problem running on windows,if you have any question,you can ask me ^^

JuZi233 commented 6 months ago

hi guys,i have work out all the problem running on windows,if you have any question,you can ask me ^^

thanks guys, i have work out it too. instead of "unistd.h":No such file or directory", u can replace "#include " with "#include

include " in common.hpp, and add two new method instead, like this;

define F_OK 0

inline bool IsFile(const std::string& path) { if (!IsPathExist(path)) { printf("%s:%d %s not exist\n", FILE, LINE, path.c_str()); return false; } struct stat buffer; // return (stat(path.c_str(), &buffer) == 0 && S_ISREG(buffer.st_mode)); return (stat(path.c_str(), &buffer) == 0 && (buffer.st_mode & _S_IFMT) == _S_IFREG); }

inline bool IsFolder(const std::string& path) { if (!IsPathExist(path)) { return false; } struct stat buffer; // return (stat(path.c_str(), &buffer) == 0 && S_ISDIR(buffer.st_mode)); return (stat(path.c_str(), &buffer) == 0 && (buffer.st_mode & _S_IFMT) == _S_IFDIR); }

JuZi233 commented 6 months ago

finally, i create a dll file with this project , for my python application . ^v^

Dwinovo commented 6 months ago

hi guys,i have work out all the problem running on windows,if you have any question,you can ask me ^^

thanks guys, i have work out it too. instead of "unistd.h":No such file or directory", u can replace "#include " with "#include #include " in common.hpp, and add two new method instead, like this; #define F_OK 0 inline bool IsFile(const std::string& path) { if (!IsPathExist(path)) { printf("%s:%d %s not exist\n", FILE, LINE, path.c_str()); return false; } struct stat buffer; // return (stat(path.c_str(), &buffer) == 0 && S_ISREG(buffer.st_mode)); return (stat(path.c_str(), &buffer) == 0 && (buffer.st_mode & _S_IFMT) == _S_IFREG); }

inline bool IsFolder(const std::string& path) { if (!IsPathExist(path)) { return false; } struct stat buffer; // return (stat(path.c_str(), &buffer) == 0 && S_ISDIR(buffer.st_mode)); return (stat(path.c_str(), &buffer) == 0 && (buffer.st_mode & _S_IFMT) == _S_IFDIR); }

yes ,what you do is what i do!!!!

manfrey666 commented 4 months ago

hi guys,i have work out all the problem running on windows,if you have any question,you can ask me ^^

Could you show me your cmakelists.txt? Thanks.

Dwinovo commented 4 months ago

sorry , I have deleted the codes about this project ,if u meet any problem ,u can show it maybe i could help

manfrey666 commented 4 months ago

sorry , I have deleted the codes about this project ,if u meet any problem ,u can show it maybe i could help

I used visual studio to compile successfully with the methods above, but an error occurred when running the yolov8.exe file: Unable to locate program input point "cudaMallocAsync" in dynamic link library

I have posted it in a new issuse: https://github.com/triple-Mu/YOLOv8-TensorRT/issues/217#issue-2310130801

triple-Mu commented 4 months ago

Now this pr will fix path operator by filesystem. Welcome to try it and give valuable feedback!