Comment
Author: Admin | 2025-04-27
The Makefile run the command $ make in your terminal. It builds darknet in your system. You may come across some issue with libraries like for eg. in my case I was facing this error: Error while loading shared libraries: lcublas: cannot open shared object file: No such file or directory . To solve such library related issues, run $ sudo nautilus from a new terminal to open file explorer as root and navigate to /usr/local. You will see two folders cuda-10.1 and cuda-10.2. Navigate to _cuda-10.2/targets/x8664-linux, and copy the contents of the two folders ‘include’ and ‘lib’ present there to corresponding folders of the same names in _cuda-10.1/targets/x8664-linux. $ make should run now.Once darknet is built, the next step is to download the YOLOv4 pre-trained weights to run inference. You will find it in _AlexeyAB’s github_. From your terminal in the darknet directory, run the command $ wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights . It will download the weight file into your darknet directory.Now you can run inference of Object Detection on test images using command: $ ./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/dog.jpg . You will remember that while configuring the Makefile, we had not changed the values of ‘CUDNN_HALF’ to 1. You can initially $ make darknet with it set to 1 and if some problem arises, like in my case I did not have bounding boxes in my output, you can set it back to 0, $ make darknet again and run inference.You can view the resultant output, with the
Add Comment