加入CODE CHINA

· 不限速    · 不限空间    · 不限人数    · 私仓免费

免费加入
README.md

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

项目简介

🚀 Github 镜像仓库 🚀

源项目地址

https://github.com/chineseocr/opencv-for-darknet

发行版本

当前项目没有发行版本

贡献者 2

开发语言

  • C++ 100.0 %