Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

compile and link my existing code against movidius caffe?

idata
Employee
606 Views

Hello

 

I'm trying to use movidius with an existing NN project. I've installed movidius, and after playing around with the samples I found out that movidius installation comes with caffe installed (in /opt/movidius/ssd-caffe).

 

So now I want to link my existing code against that caffe version, I set build variables to point to movidius caffe (Caffe_INCLUDE_DIRS=/opt/movidius/ssd-caffe/build/install/include, Caffe_LIBS=/opt/movidius/ssd-caffe/build/install/lib/libcaffe.so).

 

When I compile the code with GPU flags - I get errors about using GPU in CPU only Caffe version (runtime error when using mutable_gpu_data, Caffe::set_mode(Caffe::GPU), forward_gpu etc.)

 

When I use CPU only mode - the code just can't compile (Until now this was a GPU-only project).

 

The question is - is there an easy way to compile existing Caffe project to work with caffe movidius? is this the right way to go? Do I have to compile my NN to graph file and use movidius API?

0 Kudos
1 Reply
idata
Employee
387 Views

@ohadcn Typically your network can be trained in any way, GPU or CPU. After your model is trained, it should output a caffemodel file. You can then modify your training prototxt to create a deployment prototxt. Next you use the NCSDK's mvNCCompile to generate your graph file by specifying your caffemodel and deployment prototxt files. After generating the graph file, the NCSDK API can be used to load your graph file and make inferences using loadTensor and getResult. Here is more information on the API: https://movidius.github.io/ncsdk/index.html#NcApi

0 Kudos
Reply