darknet YOLOv3 GPU使用時のmakeについて
環境は
Ubuntu 16.04
CUDA 9.1
Opencv 3.3.0
YOLOv3をGPUを使って利用しようと考えたのですが、makeでエラーが出ます。
以下行ったこと
git clone https://github.com/pjreddie/darknet
cd darknet
vim Makefile #GPU=1, OPENCV=1に変更
make
エラー内容
gcc -Iinclude/ -Isrc/ -DOPENCV `pkg-config --cflags opencv` -DGPU -I/usr/local/cuda-9.1/include/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./src/gemm.c -o obj/gemm.o
In file included from /usr/local/include/opencv2/core/types_c.h:59:0,
from /usr/local/include/opencv2/core/core_c.h:48,
from /usr/local/include/opencv2/highgui/highgui_c.h:45,
from include/darknet.h:25,
from ./src/utils.h:5,
from ./src/gemm.c:2:
/usr/local/include/opencv2/core/cvdef.h:485:1: error: unknown type name ‘namespace’
namespace cv {
compilation terminated due to -Wfatal-errors.
Makefile:85: recipe for target 'obj/gemm.o' failed
make: *** [obj/gemm.o] Error 1