0

I have been trying to install Darknet on my own device (which runs on Windows 10) unsuccessfully. I am following the rough guide here: https://pjreddie.com/darknet/install/. However, it only contains the steps for a Linux configuration, so I have been checking out posts and videos about doing it on Windows.

Has anyone come across a relatively straightforward guide or YouTube video about how to install Darknet without the need to have a local GPU (as a dependency, CUDA requires GPU) that you have found particularly useful? I have been following a few (https://www.youtube.com/watch?v=saDipJR14Lc was pretty clear), but they all go through the CUDA installation as a must (where CUDA should be an optional dependency).

Many thanks in advance!

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
AK_KA
  • 73
  • 1
  • 10

2 Answers2

1

You can use this GitHub repository for installing darknet. Refer to this section for installing it on Windows 10.

There is a detailed description provided on how to go about installing it on Windows 10 without GPU and OpenCV support

Jitesh Malipeddi
  • 2,150
  • 3
  • 17
  • 37
  • Thanks a lot for your help! I finally managed to get hold of a machine with NVIDIA GPU and have been following the instructions that you pointed me to. However, I get stuck at point 4: "Run command: python build\darknet\x64\data\voc\voc_label.py (to generate files: 2007_test.txt, 2007_train.txt, 2007_val.txt, 2012_train.txt, 2012_val.txt)". Perhaps this is a basic question/issue, but do I need to execute this line in my Windows 10 command prompt (it does not seem to be recognized as valid)? Many thanks again! – AK_KA Apr 25 '21 at 13:22
  • Ideally, it should work in windows command prompt, maybe you can try the same in Windows Powershell? What's the error exactly? – Jitesh Malipeddi Apr 26 '21 at 01:27
  • "run command..." I believe is used to set up files that you would use for training; Next step from there is to determine anchors; though that's really not helpful until you've trained a network a few times & understand the requirements to improve it without over constraint. AlexeyB's github is the go-to place for anything darknet on Win10; so you're in the right place. try running the demo which performs yolo object detection using your webcam: Requires at min 3 command line arguments -datafile -config -weights FOR EX: darknet.exe detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights – Shawn Ramirez May 07 '21 at 05:35
  • Thanks everyone for your input! It seems like I have been able to install darknet successfully, however, I am still unable to train using the Pascal VOC data. I followed the instructions that @JiteshMalipeddi provided, but get an error in the cmd when executing "python build\darknet\x64\data\voc\voc_label.py". The error is: python: can't open file 'build\darknet\x64\data\voc\voc_label': [Errno 2] No such file or directory. I don't get it as I do have that file (it exists) and it's located in the voc directory... – AK_KA May 10 '21 at 14:11
1

In the end, I was able to successfully install Darknet using the following 3 lines of code in Powershell (after installing the required dependencies, with ninja this time around, as well as cloning the Alexey AB repository):

cd darknet
git pull 
.\build.ps1 -EnableCUDA -EnableCUDNN -EnableOPENCV -EnableOPENCV_CUDA -UseVCPKG

The discussions on the Discord forum were extremely helpful: https://discord.com/channels/741676058666860635/741676058666860639

AK_KA
  • 73
  • 1
  • 10