Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
256 Views

Can't get result

Hi:

 

every one.

 

when i run the sample code

 

// start the inference with mvncLoadTensor() retCode = mvncLoadTensor(graphHandle, imageBufFp16, lenBufFp16, NULL); free(imageBufFp16); if (retCode != MVNC_OK) { // error loading tensor printf("Error - Could not load tensor\n"); printf(" mvncStatus from mvncLoadTensor is: %d\n", retCode); return false; } // the inference has been started, now call mvncGetResult() for the // inference result printf("Successfully loaded the tensor for image %s\n", imageFileName); void* resultData16; void* userParam; unsigned int lenResultData; retCode = mvncGetResult(graphHandle, &resultData16, &lenResultData, &userParam); if (retCode != MVNC_OK) { printf("Error - Could not get result for image %s\n", imageFileName); printf(" mvncStatus from mvncGetResult is: %d\n", retCode); return false; }

 

there will be a timeout error when I call mvncGetResult function. I traced the code,

 

in the function usblink_getdata in file usb_link_vsc.c:

 

usigned int operation_permit = 0xFFFF;

 

if (usb_read(f, &operation_permit, sizeof(operation_permit)))

 

return -1;

 

if (operation_permit != 0xABCD)

 

return -1;

 

the operation_permit Value i readed is 0xFFFF, so ……….

 

how can i solve this problem ?

 

Thanks alot

0 Kudos
6 Replies
idata
Community Manager
56 Views

@zhangyayu Are you running the multistick cpp sample at https://github.com/movidius/ncappzoo/blob/master/apps/multistick_cpp/cpp/multistick.cpp? This sample uses two NCS devices to showcase using two different networks with two NCS devices in one application, so make sure you have two NCS devices to run this sample.

idata
Community Manager
56 Views

@ Tome_at_Intel HI! There is only one NCS devices on my platform. I rewrite the hello_ncs sample, copy the LoadImage and DoInferenceOnImageFile function from the multistick sample. Then I load the Image file , load the graph file(googlenet.graph), call the mvncLoadTensor function, every thing is OK. But when i call the mvncGetResult function, the returned value is error(time out). So i traced the code of mvncGetResult fucntion. In this function, usblink_getdata is called in the do while cycle. In the usblink_getdata function, we send cmd to the usb device that we will get data , then we will get the operation_permit flag by call the function usb_read which finished successfully, but the flag value readed is 0xFFFF, not 0xABCD.

 

It looks like that the device is in the wrong status. Is there anything that i can do to find out the reason ?

 

Thanks alot
idata
Community Manager
56 Views

Hi:

 

After the mvncLoadTensor function is called , i call the function usblink_getmyriadstatus , the return value of status is 0x33, which means the device is working . But when i call the usblink_getmyriadstatus again, it will failed in writing data to the device.

 

I think maybe the device is working and meets some mistake when processing the image ?

 

The graph file i loaded is the googlenet.graph , and the image file is the PNG file in the SDK's data directory.
idata
Community Manager
56 Views

@zhangyayu Which version of the NCSDK are you using (i.e. version 1.12?) Can you provide a link to your code so that I can reproduce the issue? Thanks!

idata
Community Manager
56 Views

@Tome_at_Intel Thanks a lot. This problem is caused by the goolenet.graph file loaded into the movidius stick . I downloaded another googlenet.graph file, the function mvncGetResult function works well. I am checking the differences between two files.

 

Thanks for your help
idata
Community Manager
56 Views

@zhangyayu I'm happy to hear that it's working for you. Make sure you are using a graph file that was compiled with the same SDK version you are using. Graph files are only compatible with the same version of the SDK they were compiled with.