Giter VIP home page Giter VIP logo

opencv-for-darknet's Introduction

opencv-for-darknet

Adjust opencv for darknet, Support CNN "relu" and maxpool "VALID"

complie

get opencv

#wget https://codeload.github.com/opencv/opencv/zip/4.0.1   
wget http://www.chineseocr.com:9990/static/models/opencv/opencv.4.0.1.zip    
 
unzip  opencv.4.0.1.zip && \
cp darknet_io.cpp opencv-4.0.1/modules/dnn/src/darknet && \
cp layers_common.cpp opencv-4.0.1/modules/dnn/src/layers && \
cp all_layers.hpp opencv-4.0.1/modules/dnn/include/opencv2/dnn/

mac

cd opencv-4.0.1 && mkdir build && cd build && cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D BUILD_opencv_python2=OFF \
    -D BUILD_opencv_python3=ON  \
   -D PYTHON3_EXCUTABLE=~/anaconda3/envs/chineseocr/bin/python3 \
  -D PYTHON3_INCLUDE_DIR=~/anaconda3/envs/chineseocr/include/python3.6m  \
-D PYTHON3_LIBRARY=~/anaconda3/envs/opencv/lib/libpython3.6m.dylib \
-D PYTHON_NUMPY_PATH=~/anaconda3/envs/opencv/lib/python3.6/site-packages/numpy/core/include .. \
&& make -j2 && make install

 

ubuntu

cmake -D CMAKE_BUILD_TYPE=RELEASE \
     -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D BUILD_opencv_python2=OFF \
    -D BUILD_opencv_python3=ON  \
   -D PYTHON3_EXCUTABLE=/usr/bin/python \
  -D PYTHON3_INCLUDE_DIR=/usr/include/python3.6m  \
-D PYTHON3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \
-D PYTHON_NUMPY_PATH=/usr/local/lib/python3.6/dist-packages/numpy/ .. \
&& make -j2 && make install

opencv-for-darknet's People

Contributors

wenlihaoyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.