在Windows 10上安装Darknet

时间:2020-10-31 13:02:35

标签: c++ opencv yolo darknet vcpkg

我正在尝试使用以下链接中的说明在Windows 10上安装darknet: https://github.com/kiyoshiiriemon/yolov4_darknet/tree/b504cc3b4e47617c2cf28c37a6581fc733854f06

但是,我通过Windows PowerShell遇到以下错误:

-- Configuring x64-windows CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:106 (message):
    Command failed: ninja -v
    Working Directory: C:/Users/hedey/vcpkg/buildtrees/opencv4/x64-windows-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      C:\Users\hedey\vcpkg\buildtrees\opencv4\config-x64-windows-out.log

Call Stack (most recent call first):   scripts/cmake/vcpkg_configure_cmake.cmake:312 (vcpkg_execute_required_process)   ports/opencv4/portfile.cmake:280 (vcpkg_configure_cmake)   scripts/ports.cmake:135 (include)
Error: Building package opencv4:x64-windows failed with: BUILD_FAILED Please ensure you're using the latest portfiles with `.\vcpkg update`, then submit an issue at https://github.com/Microsoft/vcpkg/issues including:   Package: opencv4:x64-windows   Vcpkg version:
2020.06.15-nohash
Additionally, attach any relevant sections from the log files above.

我完全无法解决这个问题。

这是完整的日志文件,可以在以下链接中找到: https://www.dropbox.com/s/f30g354t26n1mvg/log_files.zip?dl=0

我注意到png.h文件存在于C:\ Users \ hedey \ vcpkg \ installed \ x64-windows \ include \ libpng16而不是C:\ Users \ hedey \ vcpkg \ installed \ x64-windows \ include \ libpng(即在CMakeError文件中进行搜索的位置)。 此外,png.h和pthread.h都位于C:\ Users \ hedey \ vcpkg \ installed \ x64-windows \ include。

编辑: 我更新vcpkg(使用git pull)后,上述问题已解决。 但是,我遇到了另一个错误,如下所示:

FAILED: modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.obj 
cmd.exe /C "cd /D C:\Users\hedey\vcpkg\buildtrees\opencv4\x64-windows-dbg\modules\core\CMakeFiles\cuda_compile_1.dir\src\cuda && C:\Users\hedey\vcpkg\downloads\tools\cmake-3.18.4-windows\cmake-3.18.4-win32-x86\bin\cmake.exe -E make_directory C:/Users/hedey/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/. && C:\Users\hedey\vcpkg\downloads\tools\cmake-3.18.4-windows\cmake-3.18.4-win32-x86\bin\cmake.exe -D verbose:BOOL=OFF -D build_configuration:STRING=Debug -D generated_file:STRING=C:/Users/hedey/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.obj -D generated_cubin_file:STRING=C:/Users/hedey/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.obj.cubin.txt -P C:/Users/hedey/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.obj.Debug.cmake"
nvcc fatal   : Unsupported gpu architecture 'compute_30'
CMake Error at cuda_compile_1_generated_gpu_mat.cu.obj.Debug.cmake:220 (message):
  Error generating
  C:/Users/hedey/vcpkg/buildtrees/opencv4/x64-windows-dbg/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.obj

我之前使用cmake gui遇到过这个问题,可以通过将CUDA_ARCH_BIN设置为适合GPU的值(在我的情况下为6.1)来解决。 但是,如果使用vcpkg安装,我不知道如何解决。我试图找到一个可以编辑的文件,我认为它是“ OpenCVDetectCUDA.cmake”。我尝试对该文件进行一些编辑,但仍然遇到相同的错误。您能帮我解决这个问题吗?

0 个答案:

没有答案