-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant make the YOLO when OPENCV=1 Ubuntu 17.10 #485
Comments
I also encountered the same issue with Mac OS High Sierra
|
Huge flop on my side. I was compiling OpenCV 2x because i cloned from Github OpenCV. Turned out I have to check out the latest release to be able to compile the c++ version. I recompiled Opencv 3x and then recompiled darknet. Issue resolved. That's how it happened for me at least. |
Same error, I've this version of OpenCV
But I still get the Error
How do you solved? |
Can’t read your error @selection |
Thanks for quick response.
Seems it search for OpenCV2 instead of OpenCV3 |
Did you build opencv;
make && sudo make install
?
I compiled my opencv from git.
On Wed, 28 Feb 2018 at 12:35 AM Selektion ***@***.***> wrote:
Yes, Sorry, I translated it.
make
gcc -Iinclude/ -Isrc/ -DOPENCV `pkg-config --cflags opencv` -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -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: set of instructions for the objective "obj / gemm.o" failed
make: *** [obj/gemm.o] Error 1
Seems it search for OpenCV2 instead of OpenCV3
In file included from /usr/local/include/**opencv2**/core/types_c.h:59:0,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#485 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAg9KukYrmWJjPeIFHjQogyYVtiCSjouks5tZC7kgaJpZM4SPI6Q>
.
--
.: Pardon message brevity. Sent from mobile.
Thanks,
Gil
|
Yes OpenCV is built and works fine in other projects (python projects and c++) |
Did you enable CUDA? I only enabled my OpenCV because I don't have CUDA. It worked on mine without CUDA enabled but very slow. Check out this issue cvjena/darknet#9 Btw, mine also points to the same path (but w/o Cuda) |
Yeah me too, just OpenCV, How do you solved? Installing OpenCV3? The folder seems rhe same
|
Could you try the following commands?
and then
mine has the following output.
|
That's mine:
|
I've this in addiotion at yours, but i don't thin that can be a problem |
not sure . i removed some of mine because they have no support on my laptop. im just gonna send my proj to you for reference. this is the log for my successful build. https://drive.google.com/open?id=1vwOO6FJq1UkmfvovMKBcqke47ATuVzdJ and this is my make file
and lastly, my mistake was mistakenly building and installing the old version of opencv when i cloned from git. i had to do a |
Thanks |
And maybe lastly just to cover all bases here. You may want to install CUDA library. i installed mine from nvidia even though i had no GPU on my mac. maybe that influenced somehow for now. and also make sure to use a new terminal from scratch everytime you build if you've installed anything via make install or from the package installer. im using mac, and sometimes changes to environment variables dont reflect immediately if they're done externally.you either have to do a the webcam also works. but really really slow. im looking in to trying with GPU next. |
I've AMD R9 Fury as GPU, should I install CUDA? |
you can still instll cuda so that that libs are on - and maybe that has any influence on the build. but it will never work with gpu acceleration (and you shouldn't set gpu to true) because cuda is nvidia stuff. |
most of these guys really only prioritize Nvidia stuff. case in point the Facebook implementation https://github.com/facebookresearch/Detectron/blob/master/INSTALL.md and they're really good too. |
Same here... problem with the make...
gcc version...
Anybody facing the same? |
For the original issues : Under ubuntu 17.x it builds ok, provided you installed the OpenCV libraries For Cuda ... you may try : |
I have the same issue as @pcstory. Running mac high sierra. Ran the following
updated Makefile to set:
then run error with the following message Anyone have a solution? Thank you |
I had the issue with not being able to compile with openCV on mac but have resolved the issue. As @NguyenAiSi points out (and @joshholla requested details for) openCV 3 didn't work and that openCV 2.4 works. Although installing and setting the environment variables aren't as simple as a typical 'brew install xxxx'. First uninstall installed versions of opencv Then install openCV 2.4 The messages after install are: If you need to have this software first in your PATH run: For compilers to find this software you may need to set: First time around I missed these messages. Instead run the following commands:
then After that I edited the Makefile and set saved and then ran This created a lot of warning messages but ultimately compiled. Then I could run the webcam demo: And while this strictly speaking "worked" the frame rate was less than 1 FPS and so very slow. With a macbook pro I don't have the option to use the onboard non-nvidia GPU to speed this up. |
I did everything as per lomnes instructions. The last step of $ make in darknet failed with linker error below. So detection works fine but still no luck with Opencv Undefined symbols for architecture x86_64: |
I compile darknet with opencv 3.4.0 in Arch Linux, it works great. |
Hi All, I had the same problem. The message In any case, to work around this without playing Russian roulette with OpenCV versions, I made two changes to the OpenCV header files (one change is somewhat dubious, the other is most likely a bug fix). Change 1: Highly Dubious, May Break Other Builds, Proceed at Own RiskIn
To this (just comment it out)
Change 2: Not as Dubious, Likely an Actual BugIn
To this:
Hope that works for for anyone else with this version. Otherwise library version Russian roulette may be a better option. |
To fix using Homebrew without uninstalling opencv3, install opencv@2: Then change the LDFLAGS and COMMON flags to:
Lines 44 to 45 in e84933b
|
my laptop have graphic processor Geforce Nvidia 820M and i also installed CUDA toolkit 9.1 and OPENCV 3.3.1. ./darknet detector demo cfg/coco.data cfg/yolo.cfg yolo.weights |
the answer from @JHumphreyJr work for me on macOS. Besides, use |
I had the issue with not being able to compile with openCV on mac but have resolved the issue. As @NguyenAiSi points out (and @joshholla requested details for) openCV 3 didn't work and that openCV 2.4 works. Although installing and setting the environment variables aren't as simple as a typical 'brew install xxxx'. First uninstall installed versions of opencv Then install openCV 2.4 The messages after install are: If you need to have this software first in your PATH run: For compilers to find this software you may need to set: First time around I missed these messages. Instead run the following commands: echo 'export PATH="/usr/local/opt/opencv@2/bin:$PATH"' >> ~/.bash_profile then After that I edited the Makefile and set saved and then ran This created a lot of warning messages but ultimately compiled. Then I could run the webcam demo: And while this strictly speaking "worked" the frame rate was less than 1 FPS and so very slow. With a macbook pro I don't have the option to use the onboard non-nvidia GPU to speed this up. Resolved my problem |
Hello, Using this repo: https://github.com/AlexeyAB/darknet#how-to-compile-on-windows |
SOLUTION: 'namespace' is breaking stuff because it is C++ (while YOLO is in C). You can test for being in C++ with the if-statement: #if defined __cplusplus. See solution here: opencv/opencv#10963 (comment) @bayesianio I don't know what opencv version that is but you could probably just put the namespace line in an if-statement with a C++ check and it would work. |
I have already installed opencv(2.4) via brew with python 2.7
|
@jdellithorpe |
I am running into the issue on make opencv work in darknet. Please help. ubuntu@ubuntu-ThinkPad-X1-Carbon:
|
Can You please explain how did you recompile Opencv3 step by step? I can't make the program work as I have the same issue UPDATE: |
I didn't find any folder named "Cellar" in /usr/local directory... I have Linux mint 18. |
By adding |
I resolved it using following steps:
Well not much of use, just got 2 FPS :( |
Thank you so much ,it worked. |
Hello, I just have a question |
Hello I have the following problem
|
Show error when try to make
The text was updated successfully, but these errors were encountered: