Why USE_OPENCV is OFF in PyTorch installation?

649 Views Asked by At

In CMakeLists.txt in pytorch folder, use Opencv is ON.

option(USE_OPENCL "Use OpenCL" OFF)
option(USE_OPENCV "Use OpenCV" ON)
option(USE_OPENMP "Use OpenMP for parallel code" OFF)

In setup.py, variable is set with Opencv as

use_env_vars = ['CUDA', 'CUDNN', 'MIOPEN', 'MKLDNN', 'NNPACK', 'DISTRIBUTED',
                'OPENCV', 'SYSTEM_NCCL', 'GLOO_IBVERBS']

My PC has Opencv installed and can check with pkg-config --modversion opencv gives me 3.3.0.

OpenCV is installed in my PC. But during Caffe2 installation, it showed me

--   USE_NERVANA_GPU       : OFF
--   USE_NNPACK            : 1
--   USE_OBSERVERS         : ON
--   USE_OPENCL            : OFF
--   USE_OPENCV            : OFF
--   USE_OPENMP            : OFF
--   USE_PROF              : OFF
--   USE_REDIS             : OFF
--   USE_ROCKSDB           : OFF
--   USE_ZMQ               : OFF

OpenCV is OFF. How can I ON OpenCV in Caffe2?

1

There are 1 best solutions below

0
On

You can use something like this:

USE_OPENCV=1 USE_FFMPEG=1 USE_LMDB=1 python setup.py install