Caffe: NuGet packages and Windows Build

Created on 29 Aug 2016  ·  5Comments  ·  Source: BVLC/caffe

Hi,
I am an absolute beginner in Caffe and I am trying to build the Caffe solution on windows 10 on Visual Studio 2015 with OpenCV 3.1.0. I have been following this https://www.youtube.com/watch?v=nrzAF2sxHHM youtube link for reference.

These are the steps that I have followed till now:-

  1. I have uninstalled OpenCv 2.4 from the Nuget Packages library and have installed opencv default build (Opencv 310) instead.
  2. Also I have enabled the Nuget packages by going to Tools->Options->NuGet Package Manager->Package Sources and have checked Microsoft and dot net option there.
  3. Just FYI, I want to run in the CPU only mode (no GPU) and have changed the settings in CommonSettings.props as follows,
    <CpuOnlyBuild> true </ CpuOnlyBuild> <UseCuDNN > false </UseCuDNN>
  4. I have also changed the BLAS configuration from default (atlas) to open since OpenBlas v 0.2.14.1 is installed in the Nuget packages.
    # BLAS configuration (default = ATLAS) BLAS ?= open

I am still getting the following build errors-

Severity    Code    Description Project File    Line    Suppression State
Error       This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\..\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.props.    libcaffe    C:\Users\AD355671\Downloads\caffe-master\caffe-master\windows\libcaffe\libcaffe.vcxproj 376 

Severity    Code    Description Project File    Line    Suppression State
Error       This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\..\NugetPackages\OpenBLAS.0.2.14.1\build\native\openblas.targets.    caffe   C:\Users\AD355671\Downloads\caffe-master\caffe-master\windows\caffe\caffe.vcxproj   100 

My questions are:-

  1. Why is it still building with Opencv2.4 when I have uninstalled it and used Opencv3.10?
  2. How do I resolve these build errors? Am I missing out setting any environment variables or any entry on the properties of config files(MakeFile.config and CommonSettings.props )?
  3. Why is it not able to pick from openBlas?

Please help as I have been stuck with this for long. Thanks in advance.

windows

Most helpful comment

Hi,
I had this same problem. To solve it you need to create a folder NugetPackages in the 2nd top directory of your current folder and copy the content of packages (which is in caffe-windows\windows) there.
then you need to rename all libboost**vc120** to libboost**vc140** in boost** folders inside NugetPackages for VS2015 compatibility.

All 5 comments

Hi,
I had this same problem. To solve it you need to create a folder NugetPackages in the 2nd top directory of your current folder and copy the content of packages (which is in caffe-windows\windows) there.
then you need to rename all libboost**vc120** to libboost**vc140** in boost** folders inside NugetPackages for VS2015 compatibility.

@Adnino
Your comment is so important for me! Thank you for providing this solution!

The directory shall be like below:

+ NugetPackages
|----+ OpenCV.2.4.10
+ caffe
|----+ src
|----+ windows
|       |-----+ packages
|----+ Caffe.sln

@Adnino Renaming binaries that were compiled with v120 to pretend they were with v140 is dangerous (and won't work in most cases) since both VS breaks the ABI from version to version. Once again, VS 2015 is not yet supported I encourage you to stick to VS 2013.

@willyd I think you are right. I compiled caffe using VS2015 with the vc120 libs provided by Nuget, and the program just carshes at startup ...

Build using caffe.sln is deprecated please use the precompiled binaries and CMake build.

Was this page helpful?
0 / 5 - 0 ratings