Building Torchvision C++ API from source

If you want to invoke the cmake script here, I think LibTorch is sufficient. Here is what I have done to make it work:

  1. Download https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.4.0.zip and extract to D:\libtorch
  2. Clone pybind11 and install to D:\pybind11
git clone https://github.com/pybind/pybind11.git
cd pybind11
mkdir build
cd build
cmake -DPYBIND11_TEST=OFF -DCMAKE_INSTALL_PREFIX="D:\pybind11" ..
  1. Clone torchvision and build
git clone https://github.com/pytorch/vision.git
cd vision
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="D:\libtorch;D:\pybind11" ..
1 Like