-
Notifications
You must be signed in to change notification settings - Fork 0
Run darknet Yolo3
Kewei Yan edited this page Feb 15, 2023
·
9 revisions
Before make, please go to check Makefile to make sure that the path for loading libraries such as CUDA, cuDNN, openCV are matching your machine, especially for opencv
, now the package name may need to be changed to opencv4
git clone https://github.com/pjreddie/darknet.git
cd darknet
make
./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg
If you are using cuDNN 8.0+, please go to the following link to handle the CUDNN_MAJOR
. You need to replace the src/convolutional_layer.c
with the one you can find there.
go to src/image_opencv.cpp
, add these headers:
#include "opencv2/core/core_c.h"
#include "opencv2/videoio/legacy/constants_c.h"
#include "opencv2/highgui/highgui_c.h"
Also, go to line 67, replace line 67 with:
IplImage ipl = cvIplImage(m);
Re-build openCV with -DOPENCV_GENERATE_PKGCONFIG=YES
, also, add /usr/local/lib/pkgconfig to PKG_CONFIG_PATH
.
install gtk2.0 before installing openCV