Windows 10の下でmobileNet ssdをコンパイルすることを記録します

2559 ワード

1.MobileNet-SDをダウンロードする:https://github.com/eric612/MobileNet-SSD-windows.
2.依存環境のインストール:

 

Requirements
Visual Studio 2013 or 2015
CMake 3.4 or higher (Visual Studio and Ninja generators are supported)
Anaconda
Optional Dependencies
Python for the pycaffe interface. Anaconda Python 2.7 or 3.5 x64 (or Miniconda)
Matlab for the matcaffe interface.
CUDA 7.5 or 8.0 (use CUDA 8 if using Visual Studio 2015)
cuDNN v5

3.独自の構成に従ってコンパイルファイルbuild_を更新win.cmd:
    if NOT DEFINED MSVC_VERSION set MSVC_VERSION=14
    if NOT DEFINED WITH_NINJA set WITH_NINJA=0
    if NOT DEFINED CPU_ONLY set CPU_ONLY=0
    if NOT DEFINED CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto
    if NOT DEFINED CMAKE_CONFIG set CMAKE_CONFIG=Release
    if NOT DEFINED USE_NCCL set USE_NCCL=0
    if NOT DEFINED CMAKE_BUILD_SHARED_LIBS set CMAKE_BUILD_SHARED_LIBS=0
    if NOT DEFINED PYTHON_VERSION set PYTHON_VERSION=2
    if NOT DEFINED BUILD_PYTHON set BUILD_PYTHON=1
    if NOT DEFINED BUILD_PYTHON_LAYER set BUILD_PYTHON_LAYER=1
    if NOT DEFINED BUILD_MATLAB set BUILD_MATLAB=0
    if NOT DEFINED PYTHON_EXE set PYTHON_EXE=python
    if NOT DEFINED RUN_TESTS set RUN_TESTS=1
    if NOT DEFINED RUN_LINT set RUN_LINT=1
    if NOT DEFINED RUN_INSTALL set RUN_INSTALL=1
    :: Set python 2.7 with conda as the default python
    if !PYTHON_VERSION! EQU 2 (
        set CONDA_ROOT=E:\Anaconda2
    )
    if !PYTHON_VERSION! EQU 3 (
        set CONDA_ROOT=E:\Anaconda2
    )
    :: Build the install target
    if NOT DEFINED RUN_INSTALL set RUN_INSTALL=1

python 27を採用していますが、ここではよくエラーが発生します.
Could not find url for MSVC version = 1900 and Python version = 3.6. Call Stack (most recent call first):   CMakeLists.txt:77 (include)
python 2とpython 3のインストールアドレスをpython 2のアドレスに設定してもエラーは報告されません(私も他の人がどうしたのか見ていますが、原因は不明です...)
4.mobileNet ssdのコンパイル:
> cd $root_path/script
> build_win.cmd

エラーがなければ成功を意味し、$root_path/script/build/install/binにはcaffeが見えます.exeファイル.
5.テスト

Running Caffe


Download SSD_300x300 deploy model and save at
$caffe_root\models\VGGNet\VOC0712\SSD_300x300\
Download deploy weights from original web and save at
$caffe_root\models\MobileNet\
> cd $caffe_root/
> dectect.cmd

Python Usage
> cd $caffe_root
> python examples\ssd\test_ssd.py data\VOC0712\000166.jpg models\MobileNet\MobileNetSSD_deploy.prototxt models\MobileNet\MobileNet