pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.75k stars 21.33k forks source link

What version of opencv works 'perfectly'? #1938

Open 1nfinite opened 4 years ago

1nfinite commented 4 years ago

I am trying to compile opencv v3.4+ with ffmpeg and cuda. Ubuntu server 18.0.4. I am having issue not only with opencv compilation with cuda but even opencv alone. Basically after i fix an issue regarding on opencv compilation another issue occur.

Also, I am not sure if opencv v4+ is compatible with darknet because i am able to get it install on system but unable to work with darknet as the pkgconfig path is missing.

Could anyone provide a working installation script and version of opencv that is compatible with darknet and full cmake command that I should be using. I follow lots of tutorial online but unable to get it work correctly

Shame-fight commented 4 years ago

I am trying to compile opencv v3.4+ with ffmpeg and cuda. Ubuntu server 18.0.4. I am having issue not only with opencv compilation with cuda but even opencv alone. Basically after i fix an issue regarding on opencv compilation another issue occur.

Also, I am not sure if opencv v4+ is compatible with darknet because i am able to get it install on system but unable to work with darknet as the pkgconfig path is missing.

Could anyone provide a working installation script and version of opencv that is compatible with darknet and full cmake command that I should be using. I follow lots of tutorial online but unable to get it work correctly

My opencv version is 3.3.1, as far as I know, do not use 3.4.1, problems will occur. It is recommended that you use 3.4.0 and below

Cloud-Forge commented 4 years ago

I am working with opencv 4.2.0. it works fine

martinrkeyser commented 4 years ago

I couldn't get it working with v4.x.x on Ubuntu. When installing it does not generate a package config so when building, opencv isn't found. I could get it built with any version 3 (currently using 3.4.8)

marcoslucianops commented 4 years ago

I couldn't get it working with v4.x.x on Ubuntu. When installing it does not generate a package config so when building, opencv isn't found. I could get it built with any version 3 (currently using 3.4.8)

To generate pkg config in Ubuntu, you need use "-D OPENCV_GENERATE_PKGCONFIG=YES" flag in OpenCV 4 Cmake.

arielcai commented 4 years ago

opencv 4.2.0 generates the file opencv4.pc and that is the reason why darknet cannot find it. The Darknet Makefile needs to be modified

ifeq ($ (OPENCV), 1) COMMON + = -DOPENCV CFLAGS + = -DOPENCV LDFLAGS + = pkg-config --libs opencv4 -lstdc ++ COMMON + = pkg-config --cflags opencv4 endif

arielcai commented 4 years ago

Download Darknet from here. https://github.com/tiagoshibata/darknet This compiles Ok