AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.68k stars 7.96k forks source link

old errors building the latest code in debug mode of vs2017 #2832

Open WZRPW opened 5 years ago

WZRPW commented 5 years ago

hi @AlexeyAB , I am trying to catch up the latest update on Darknet. I followed your guide in your README.md. My cmakev3.12, cuda10.0, cudnn7.0, opencv3.4, I built OPENCV with vs2017 x64. Later I referred to your cmake guide(https://user-images.githubusercontent.com/4096485/55107892-6becf380-50e3-11e9-9a0a-556a943c429a.png) to build darknet. See my cmake file. I could build the release version of darknet in vs2017. I had tons of errors similar to this (https://github.com/AlexeyAB/darknet/issues/2300). I got no way to debug with the release version of build. I tried vs2015 and cuda9.2 to build but failed for the debug version. Any suggestions? Thanks, darknet_isntall_cmake vs_darknet_error_1

cenit commented 5 years ago

If you want to debug, I suggest installing opencv using the vcpkg guide. In that way you can have the debug library for pthreads and opencv automatically.

WZRPW commented 5 years ago

@cenit Thanks for giving your suggestion. Do you mean installing Opencv with vcpkg guide will solve the building errors for the debug mode that occurred to me? If so, could you provide your insight on why the errors occur? Thanks ahead! https://github.com/Microsoft/vcpkg

cenit commented 5 years ago

Because you cannot use a library built for release mode in a debug build. And I am almost sure that you built opencv by yourself only in release mode. Just follow the vcpkg guide here in the Darknet README.md. There are many suggestions now for installing and deploying Darknet, but that one (the newest addition) is the only one identical on all systems (win, mac,Linux - learn once use always) and usable also for debug

WZRPW commented 5 years ago

I actually built both release and debug modes of OpenCV (3.4). I used the release OpenCV for darknet this time. I previously used the release OpenCV (3.4) to build the debug mode of darknet via VS2015. That time everything was good and smooth. I still have that build on my PC and can run and debug darknet without any problem. Anyway, I will follow your suggestion and give a try. Thanks,

turboLIU commented 5 years ago

I got the same problem, have you solve it?

turboLIU commented 5 years ago

release with opencv is OK;
debug with opencv error; without opencv is ok;

WZRPW commented 5 years ago

@turboLIU , hi there. You may try to fetch the old version of darknet from the repo to overcome the issue temporarily. But you cannot use the new pre-trained model such as this one: https://github.com/radekosmulski/yolo_open_images