Compiling Darknet with opencv-python












1















I installed Darknet with CUDA support. I ran



./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg


enter image description here



I want it to run with opencv support. I had already installed opencv.



enter image description here



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.










share|improve this question





























    1















    I installed Darknet with CUDA support. I ran



    ./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg


    enter image description here



    I want it to run with opencv support. I had already installed opencv.



    enter image description here



    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.










    share|improve this question



























      1












      1








      1


      1






      I installed Darknet with CUDA support. I ran



      ./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg


      enter image description here



      I want it to run with opencv support. I had already installed opencv.



      enter image description here



      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.










      share|improve this question
















      I installed Darknet with CUDA support. I ran



      ./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg


      enter image description here



      I want it to run with opencv support. I had already installed opencv.



      enter image description here



      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      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
























          3 Answers
          3






          active

          oldest

          votes


















          1














          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.






          share|improve this answer































            0














            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






            share|improve this answer

































              0














              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






              share|improve this answer























                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
                });


                }
                });














                draft saved

                draft discarded


















                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









                1














                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.






                share|improve this answer




























                  1














                  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.






                  share|improve this answer


























                    1












                    1








                    1







                    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.






                    share|improve this answer













                    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.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jun 16 '18 at 14:05









                    Bardo91Bardo91

                    4221516




                    4221516

























                        0














                        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






                        share|improve this answer






























                          0














                          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






                          share|improve this answer




























                            0












                            0








                            0







                            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






                            share|improve this answer















                            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







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Nov 15 '18 at 15:27









                            Oleksii

                            1,014921




                            1,014921










                            answered Nov 15 '18 at 12:38









                            Ivan GoncharovIvan Goncharov

                            11




                            11























                                0














                                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






                                share|improve this answer




























                                  0














                                  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






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    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






                                    share|improve this answer













                                    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







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Feb 28 at 6:24









                                    gameon67gameon67

                                    688621




                                    688621






























                                        draft saved

                                        draft discarded




















































                                        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.




                                        draft saved


                                        draft discarded














                                        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





















































                                        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







                                        Popular posts from this blog

                                        Bressuire

                                        Vorschmack

                                        Quarantine