Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Sreedhar_V_Intel
Employee
191 Views

Python front end support for OpenVINO tool kit

Jump to solution

Hi,

Is there a plan to enable Python front end support for Open VINO tool kit?

 

0 Kudos
1 Solution
Severine_H_Intel
Employee
191 Views

Dear Sreedhar,

We have a Python API for the IE and you can see it in use in our Python samples in the R2 and R3 release. The samples can be found in the samples folder at the following path: computer_vision_sdk_2018.3.343\deployment_tools\inference_engine\samples\python_samples.

Best, 

Severine

 

View solution in original post

4 Replies
Mark_L_Intel1
Moderator
191 Views

Hi Sreedhar,

Can you more specific what "Python front end" mean?

Mark

Sreedhar_V_Intel
Employee
191 Views

Is it possible to use Python as front end to develop sample[eg:hello_classification/main.cpp] with inference engine?

Severine_H_Intel
Employee
192 Views

Dear Sreedhar,

We have a Python API for the IE and you can see it in use in our Python samples in the R2 and R3 release. The samples can be found in the samples folder at the following path: computer_vision_sdk_2018.3.343\deployment_tools\inference_engine\samples\python_samples.

Best, 

Severine

 

View solution in original post

Mark_L_Intel1
Moderator
191 Views

Hi Sreedhar,

As a start point, you can run python API from the command line which gives you a convenient to do a quick try.

But you have to run the shell script to set up PYTHONPATH:

$ source <OpenVINO Install Dir>/bin/setupvars.sh
$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from openvino.inference_engine import *
>>> net = IENetwork.from_ir(model="<OpenVINO Install Dir>/deployment_tools/intel_models/face-detection-retail-0004/FP32/face-detection-retail-0004.xml",weights="<OpenVINO Install Dir>/deployment_tools/intel_models/face-detection-retail-0004/FP32/face-detection-retail-0004.bin")
>>> from openvino.inference_engine import *
>>> plugin = IEPlugin(device="HETERO:FPGA,CPU")
>>> plugin.set_config({"TARGET_FALLBACK": "HETERO:FPGA,CPU"})
>>> plugin.set_initial_affinity(net)
>>> for l in net.layers.values():
...     if l.type == "Convolution":
...             l.affinity = "CPU"
... 
>>> 
[2]+  Stopped                 python3

You can refer to the Python API introductions for further help.

Mark

Reply