frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Alert: This site has migrating to our new home at https://forums.intel.com/s/topic/0TO0P000000PqZDWA0/intel-neural-compute-sticks. Please visit us there!

Issue with executing created graph file for tensorflow

Hello,

I have created the graph file for NCSDK API and I am trying to deploy the graph file to the device. Initially I got an error which was related to python library and I fixed it. But executing the prediction code does nothing. The cursor keeps blinking for some time and stops. I am not sure whether the stick is executing my prediction and how long it might take. It has been more than 2 hours. I also post my code here for reference.

`import cv2
import numpy
import mvnc.mvncapi as mvnc

devices = mvnc.EnumerateDevices()
if len( devices ) == 0:
print( 'No devices found' )
quit()

device = mvnc.Device( devices[0] )
device.OpenDevice()

with open( 'mnist_inference.graph', mode='rb' ) as f:
blob = f.read()

graph = device.AllocateGraph( blob )

path = 'Defect.PNG'
img = cv2.imread(path, cv2.COLOR_BGR2RGB)
img = cv2.resize(img, (100, 25))
img = img.astype(numpy.float32)

output, userobj = graph.GetResult()

print('\n------- predictions --------')
print(output)

graph.DeallocateGraph()
device.CloseDevice()`

Comments

This discussion has been closed.