AlexeyAB / darknet

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

Next work??? #4926

Closed jubaer-ad closed 4 years ago

jubaer-ad commented 4 years ago

After building the build.ps1 using vcpkg what to do? Please, guide me from here. The output after .\build.ps1 is:

PS C:\darknet-master-re> .\build.ps1 Found vcpkg in VCPKG_ROOT: C:\vcpkg\vcpkg-master Setting up environment to use CMake generator: Visual Studio 15 2017

Directory: C:\darknet-master-re

Mode LastWriteTime Length Name


d----- 2/26/2020 6:04 PM build_win_release -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18362. -- The C compiler identification is MSVC 19.16.27035.0 -- The CXX compiler identification is MSVC 19.16.27035.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for a CUDA compiler -- Looking for a CUDA compiler - NOTFOUND -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE -- Found PThreads4W: optimized;C:/vcpkg/vcpkg-master/installed/x64-windows/lib/pthreadVC3.lib;debug;C:/vcpkg/vcpkg-master/installed/x64-windows/debug/lib/pthreadVC3d.lib -- PThreads4W_DLL_DIR: C:/vcpkg/vcpkg-master/installed/x64-windows/include/../bin -- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0 (found suitable exact version "10.0") -- Found OpenCV: C:/vcpkg/vcpkg-master/installed/x64-windows (found version "4.1.1") -- Found Stb: C:/darknet-master-re/3rdparty/stb/include -- Found OpenMP_C: -openmp (found version "2.0") -- Found OpenMP_CXX: -openmp (found version "2.0") -- Found OpenMP: TRUE (found version "2.0") -- ZED SDK not enabled, since it requires CUDA -- Configuring done -- Generating done -- Build files have been written to: C:/darknet-master-re/build_win_release Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

Checking Build System Building Custom Rule C:/darknet-master-re/CMakeLists.txt yolo_v2_class.cpp http_stream.cpp image_opencv.cpp Generating Code... activation_layer.c activations.c art.c avgpool_layer.c batchnorm_layer.c blas.c box.c captcha.c cifar.c classifier.c coco.c col2im.c compare.c connected_layer.c conv_lstm_layer.c convolutional_layer.c cost_layer.c cpu_gemm.c crnn_layer.c crop_layer.c Generating Code... Compiling... dark_cuda.c data.c deconvolutional_layer.c demo.c detection_layer.c detector.c dice.c dropout_layer.c gaussian_yolo_layer.c gemm.c getopt.c gettimeofday.c go.c gru_layer.c im2col.c image.c layer.c list.c local_layer.c lstm_layer.c Generating Code... Compiling... matrix.c maxpool_layer.c network.c nightmare.c normalization_layer.c option_list.c parser.c region_layer.c reorg_layer.c reorg_old_layer.c rnn.c rnn_layer.c rnn_vid.c route_layer.c sam_layer.c scale_channels_layer.c shortcut_layer.c softmax_layer.c super.c swag.c Generating Code... Compiling... tag.c tree.c upsample_layer.c utils.c voxel.c writing.c yolo.c yolo_layer.c Generating Code... Creating library C:/darknet-master-re/build_win_release/Release/dark.lib and object C:/darknet-master-re/build_win _release/Release/dark.exp dark.vcxproj -> C:\darknet-master-re\build_win_release\Release\dark.dll Building Custom Rule C:/darknet-master-re/CMakeLists.txt darknet.c activation_layer.c activations.c art.c avgpool_layer.c batchnorm_layer.c blas.c box.c captcha.c cifar.c classifier.c coco.c col2im.c compare.c connected_layer.c conv_lstm_layer.c convolutional_layer.c cost_layer.c cpu_gemm.c crnn_layer.c Generating Code... Compiling... crop_layer.c dark_cuda.c data.c deconvolutional_layer.c demo.c detection_layer.c detector.c dice.c dropout_layer.c gaussian_yolo_layer.c gemm.c getopt.c gettimeofday.c go.c gru_layer.c im2col.c image.c layer.c list.c local_layer.c Generating Code... Compiling... lstm_layer.c matrix.c maxpool_layer.c network.c nightmare.c normalization_layer.c option_list.c parser.c region_layer.c reorg_layer.c reorg_old_layer.c rnn.c rnn_layer.c rnn_vid.c route_layer.c sam_layer.c scale_channels_layer.c shortcut_layer.c softmax_layer.c super.c Generating Code... Compiling... swag.c tag.c tree.c upsample_layer.c utils.c voxel.c writing.c yolo.c yolo_layer.c Generating Code... http_stream.cpp image_opencv.cpp Generating Code... darknet.vcxproj -> C:\darknet-master-re\build_win_release\Release\darknet.exe Building Custom Rule C:/darknet-master-re/CMakeLists.txt yolo_console_dll.cpp uselib.vcxproj -> C:\darknet-master-re\build_win_release\Release\uselib.exe Building Custom Rule C:/darknet-master-re/CMakeLists.txt yolo_console_dll.cpp uselib_track.vcxproj -> C:\darknet-master-re\build_win_release\Release\uselib_track.exe Building Custom Rule C:/darknet-master-re/CMakeLists.txt -- Install configuration: "Release" -- Installing: C:/darknet-master-re/dark.lib -- Installing: C:/darknet-master-re/dark.dll -- Installing: C:/darknet-master-re/include/darknet/darknet.h -- Installing: C:/darknet-master-re/include/darknet/yolo_v2_class.hpp -- Installing: C:/darknet-master-re/uselib.exe -- Installing: C:/darknet-master-re/darknet.exe -- Installing: C:/darknet-master-re/uselib_track.exe -- Installing: C:/darknet-master-re/share/darknet/DarknetTargets.cmake -- Installing: C:/darknet-master-re/share/darknet/DarknetTargets-release.cmake -- Installing: C:/darknet-master-re/share/darknet/DarknetConfig.cmake -- Installing: C:/darknet-master-re/share/darknet/DarknetConfigVersion.cmake

cenit commented 4 years ago

now you have built darknet, both the "classic" executable (darknet.exe), the library (dark.lib/dll) and the "modern" executable which calls the library (uselib.exe).

What do you want to do, with darknet?

jubaer-ad commented 4 years ago

My bad. I was looking for darknet.exe. Thanks.

cenit commented 4 years ago

You have it. Glad you solved!

jubaer-ad commented 4 years ago

@cenit Basically I was confused by: "Open Powershell, go to the darknet folder and build with the command .\build.ps1. If you want to use Visual Studio, you will find two custom solutions created for you by CMake after the build, one in build_win_debug and the other in build_win_release, containing all the appropriate config flags for your system."-from this repo. What does it even mean?

cenit commented 4 years ago

Build instructions are not clear. We will try to improve them. Let me rephrase it in the way it should be written: Many users want to customize darknet and add special features for their work. This might require not just linking to the library, but even editing it. This requires modifying darknet source code. If you want to use Visual Studio, the best way is using the "Open Folder" functionality in the root folder of darknet. Thanks to the CMakeLists.txt file, VS will setup everything and be ready for you (creating a solution under the hood, but this is a detail you can ignore). On the other hand, if you just need darknet as a library or as an executable, you can just build it. If you launch .\build.ps1 (which is made to ease building darknet, and it works also without the full VS, just the Build Tools - the compiler in short), you will find also the "old style" VS solutions created for you in the meantime. These should supersede the custom VS solution that is distributed in this repository, in the same way the custom makefile is again superseded by, again, the CMakeLists.txt file. You should consider CMake as the generator of all the toolchains for each system. It creates a solution for VS, a makefile for linux, an Xcode project for the Mac, ... A good CMakeLists.txt makes the custom VS solution and makefile unnecessary. Hope it might be clearer, if not please keep asking :)

jubaer-ad commented 4 years ago

@cenit Can you please check this? #4934