linghu8812 / tensorrt_inference

699 stars 205 forks source link

Error in Yolov4.cpp and compiling in windows. #102

Open DanielEliasib opened 3 years ago

DanielEliasib commented 3 years ago

I'm compiling this on Windows 10 with CUDA 11.0, cuDNN 8.0.5.39, TensorRT 7.1.3.4 and OpenCV 4.5.3.

I couldn't find if someone else already reported this but I think there are some errors in Yolov4.cpp.

In line 57 the function says it returns bool but there is not return statement inside. I noted that this bool value is never used so I just changed it to void: void YOLOv4::InferenceFolder(const std::string &folder_name).

Also in line 117 there is an or, I'm not sure about this, but I just changed it to || and I was able to compile.

Note: If someone is compiling in Windows, I used vcpkg to install yaml-cpp and dirent, and remember to add NOMINMAX to the preprocessor definitions, with this and the changes above I was able to transform yolo-tiny and got good results.

person person_

suncan0207 commented 2 years ago

thank you for your note!