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!

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

Comments

  • 6 Comments sorted by Votes Date Added
  • @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.

  • @ 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

  • 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.

  • @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!

  • @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

  • @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.

Sign In or Register to comment.