I am trying to use the content in Inference Engine sample code directory to implement a callback function for my inference plugin. the intent is to generate async inference requests and capture the results when available. here is the code I am using:
std::cout << " Frame: "<< *infer_req_cnt << " Inference Completed" << std::endl;
when above code runs, the StartAsync() call never gets executed. I tried to step into the DLDT code but there does not seem to be any indication that the call is going through at any time. Was wondering if there is a more intuitive way to accomplish this? Or something is wrong with this implementation. By the way, above is a simplified version of similar function implemented in Inference Engine sample codes.
In the Integrate Inference Engine doc I see the following:
Perhaps you forgot the Wait statement ?
Interestingly the IDZ admin does not forward replies to proper target thread! was wondering if Shubha was ignoring me :)
From: Akhbari, Farshad
Sent: Thursday, May 16, 2019 12:59 PM
To: IDZ Admin <firstname.lastname@example.org>
Subject: RE: New comment for Computer Vision Forum topic: Async Inferrence Using Callbacks
I have been told the Wait statement blocks the callback and is contradictory to the purpose of callback. In fact, I have been told use of Wait after callback puts the infer engine to INFER_NOT_STARTED state forever. According to DLDT people, if callback is used, it should not be blocked by wait.
Anything else may strike you weird?
Have you done SetCompletionCallback() ?
Can you kindly study the sample inference_engine\samples\perfcheck\main.cpp ?
I think it accomplishes what you want to accomplish.
SetCompletionCallback is the Callback function I am trying to troubleshoot. it is the first line of code in original post. I am not sure how this is different than the one in perfcheck sample. In the perfcheck sample, the Callback is called for an array of requests and mine is only for one as they come along.
Please encapsulate your code into a main.cpp and send it to me via intel email. Please make it a simple sample-like main.cpp (not too complicated) which demonstrates the problem.
It could very well be a bug.