Anaconda下部署Facebook的Detectron

Installation in Anaconda3.5

1. $conda create -n py2.7-caffe2 python=2.7

2. $conda install pytorch-nightly -c pytorch

3. $cd $DETECTRON_PATH/ && pip install -r requirements.txt

4. $conda install pydot

5. $cd $COCOAPI_PATH/PythonAPI/ && make install

6. $cd $DETECTRON_PATH/ && make

7. Installation done and check\

a) To check if Caffe2 build was successful
  $python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
  Output: Success
b) To check if Caffe2 GPU build was successful
   This must print a number > 0 in order to use Detectron
  $python -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'
  Output: 1 (to your own configs)
c) Check that Detectron tests pass:
  $python $DETECTRON_PATH/detectron/tests/test_spatial_narrow_as_op.py
  output as below:
[E init_intrinsics_check.cc:43] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
[E init_intrinsics_check.cc:43] CPU feature avx2 is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
[E init_intrinsics_check.cc:43] CPU feature fma is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
Found Detectron ops lib: /home/baofeng/anaconda3/envs/py2.7-caffe2/lib/python2.7/site-packages/torch/lib/libcaffe2_detectron_ops_gpu.so
...
----------------------------------------------------------------------
Ran 3 tests in 2.770s

OK

Issue list in deployment

  1. net_drawer will not run correctly. Please install the correct dependencies.
    $conda install pydot

你可能感兴趣的:(Anaconda下部署Facebook的Detectron)