Compiling Darknet with opencv-python
I installed Darknet with CUDA support. I ran
./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg
I want it to run with opencv support. I had already installed opencv.
I compiled darknet with remake/make after making OPENCV=1
in Makefile, but still it is not detecting the installed opencv.
How can I make it to detect the already installed opencv?
I have installed opencv with this command pip install opencv-python --user
before installing darknet.
opencv installation anaconda darknet
add a comment |
I installed Darknet with CUDA support. I ran
./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg
I want it to run with opencv support. I had already installed opencv.
I compiled darknet with remake/make after making OPENCV=1
in Makefile, but still it is not detecting the installed opencv.
How can I make it to detect the already installed opencv?
I have installed opencv with this command pip install opencv-python --user
before installing darknet.
opencv installation anaconda darknet
add a comment |
I installed Darknet with CUDA support. I ran
./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg
I want it to run with opencv support. I had already installed opencv.
I compiled darknet with remake/make after making OPENCV=1
in Makefile, but still it is not detecting the installed opencv.
How can I make it to detect the already installed opencv?
I have installed opencv with this command pip install opencv-python --user
before installing darknet.
opencv installation anaconda darknet
I installed Darknet with CUDA support. I ran
./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg
I want it to run with opencv support. I had already installed opencv.
I compiled darknet with remake/make after making OPENCV=1
in Makefile, but still it is not detecting the installed opencv.
How can I make it to detect the already installed opencv?
I have installed opencv with this command pip install opencv-python --user
before installing darknet.
opencv installation anaconda darknet
opencv installation anaconda darknet
edited Mar 27 '18 at 14:49
James Z
11.2k71935
11.2k71935
asked Mar 27 '18 at 12:04
Abhijeet SinghAbhijeet Singh
1097
1097
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
You need to install the c++ libraries not just the python wrapper. You can do it from the sources: https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html.
add a comment |
If you're following this repo https://github.com/AlexeyAB/darknet for Windows/Linux you need to download openCV (both OpenCV 2.x.x
and OpenCV <= 3.4.0
(3.4.1
and higher isn't supported)) and put in this path for
Windows: ( C:opencv_3.0opencvbuildinclude & C:opencv_3.0opencvbuildx64vc14lib)
More instructions in the repo. If you're on Windows/Linux and still trying to figure things out you may check a video I made on that topic https://youtu.be/-HtiYHpqnBs
add a comment |
In order to compile Darknet you will need OpenCV works with C/C++ code, not python. To check whether you have installed OpenCV correctly and can be used in C program, run this command :
pkg-config --modversion opencv
If it doesn't show anything or shows wrong version, try to reinstall OpenCV OR it is possible that your machine doesn't locate opencv version correctly.
So add command to your ~/.bashrc
for example :
vim ~/.bashrc
export PKG_CONFIG_PATH=/home/user/installation/OpenCV-3.4.0/lib/pkgconfig
source ~/.bashrc
Notes : Change the path according to your opencv installation directory that contains opencv.pc
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49512394%2fcompiling-darknet-with-opencv-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to install the c++ libraries not just the python wrapper. You can do it from the sources: https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html.
add a comment |
You need to install the c++ libraries not just the python wrapper. You can do it from the sources: https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html.
add a comment |
You need to install the c++ libraries not just the python wrapper. You can do it from the sources: https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html.
You need to install the c++ libraries not just the python wrapper. You can do it from the sources: https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html.
answered Jun 16 '18 at 14:05
Bardo91Bardo91
4221516
4221516
add a comment |
add a comment |
If you're following this repo https://github.com/AlexeyAB/darknet for Windows/Linux you need to download openCV (both OpenCV 2.x.x
and OpenCV <= 3.4.0
(3.4.1
and higher isn't supported)) and put in this path for
Windows: ( C:opencv_3.0opencvbuildinclude & C:opencv_3.0opencvbuildx64vc14lib)
More instructions in the repo. If you're on Windows/Linux and still trying to figure things out you may check a video I made on that topic https://youtu.be/-HtiYHpqnBs
add a comment |
If you're following this repo https://github.com/AlexeyAB/darknet for Windows/Linux you need to download openCV (both OpenCV 2.x.x
and OpenCV <= 3.4.0
(3.4.1
and higher isn't supported)) and put in this path for
Windows: ( C:opencv_3.0opencvbuildinclude & C:opencv_3.0opencvbuildx64vc14lib)
More instructions in the repo. If you're on Windows/Linux and still trying to figure things out you may check a video I made on that topic https://youtu.be/-HtiYHpqnBs
add a comment |
If you're following this repo https://github.com/AlexeyAB/darknet for Windows/Linux you need to download openCV (both OpenCV 2.x.x
and OpenCV <= 3.4.0
(3.4.1
and higher isn't supported)) and put in this path for
Windows: ( C:opencv_3.0opencvbuildinclude & C:opencv_3.0opencvbuildx64vc14lib)
More instructions in the repo. If you're on Windows/Linux and still trying to figure things out you may check a video I made on that topic https://youtu.be/-HtiYHpqnBs
If you're following this repo https://github.com/AlexeyAB/darknet for Windows/Linux you need to download openCV (both OpenCV 2.x.x
and OpenCV <= 3.4.0
(3.4.1
and higher isn't supported)) and put in this path for
Windows: ( C:opencv_3.0opencvbuildinclude & C:opencv_3.0opencvbuildx64vc14lib)
More instructions in the repo. If you're on Windows/Linux and still trying to figure things out you may check a video I made on that topic https://youtu.be/-HtiYHpqnBs
edited Nov 15 '18 at 15:27
Oleksii
1,014921
1,014921
answered Nov 15 '18 at 12:38
Ivan GoncharovIvan Goncharov
11
11
add a comment |
add a comment |
In order to compile Darknet you will need OpenCV works with C/C++ code, not python. To check whether you have installed OpenCV correctly and can be used in C program, run this command :
pkg-config --modversion opencv
If it doesn't show anything or shows wrong version, try to reinstall OpenCV OR it is possible that your machine doesn't locate opencv version correctly.
So add command to your ~/.bashrc
for example :
vim ~/.bashrc
export PKG_CONFIG_PATH=/home/user/installation/OpenCV-3.4.0/lib/pkgconfig
source ~/.bashrc
Notes : Change the path according to your opencv installation directory that contains opencv.pc
add a comment |
In order to compile Darknet you will need OpenCV works with C/C++ code, not python. To check whether you have installed OpenCV correctly and can be used in C program, run this command :
pkg-config --modversion opencv
If it doesn't show anything or shows wrong version, try to reinstall OpenCV OR it is possible that your machine doesn't locate opencv version correctly.
So add command to your ~/.bashrc
for example :
vim ~/.bashrc
export PKG_CONFIG_PATH=/home/user/installation/OpenCV-3.4.0/lib/pkgconfig
source ~/.bashrc
Notes : Change the path according to your opencv installation directory that contains opencv.pc
add a comment |
In order to compile Darknet you will need OpenCV works with C/C++ code, not python. To check whether you have installed OpenCV correctly and can be used in C program, run this command :
pkg-config --modversion opencv
If it doesn't show anything or shows wrong version, try to reinstall OpenCV OR it is possible that your machine doesn't locate opencv version correctly.
So add command to your ~/.bashrc
for example :
vim ~/.bashrc
export PKG_CONFIG_PATH=/home/user/installation/OpenCV-3.4.0/lib/pkgconfig
source ~/.bashrc
Notes : Change the path according to your opencv installation directory that contains opencv.pc
In order to compile Darknet you will need OpenCV works with C/C++ code, not python. To check whether you have installed OpenCV correctly and can be used in C program, run this command :
pkg-config --modversion opencv
If it doesn't show anything or shows wrong version, try to reinstall OpenCV OR it is possible that your machine doesn't locate opencv version correctly.
So add command to your ~/.bashrc
for example :
vim ~/.bashrc
export PKG_CONFIG_PATH=/home/user/installation/OpenCV-3.4.0/lib/pkgconfig
source ~/.bashrc
Notes : Change the path according to your opencv installation directory that contains opencv.pc
answered Feb 28 at 6:24
gameon67gameon67
688621
688621
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49512394%2fcompiling-darknet-with-opencv-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown