G-API: Support remote inference#20156
Conversation
|
This PR: #20151 has to be merged first |
|
@dmatveev @TolyaTalamanov @rgarnov @AsyaPronina please, review |
dmatveev
left a comment
There was a problem hiding this comment.
The rest of the diff seems to be mediaframe extension-related
|
@dmatveev please, take a look at the changes |
dmatveev
left a comment
There was a problem hiding this comment.
@TolyaTalamanov I expect your review on the blob management part in the iebackend.
|
@dmatveev please, take a look once more |
|
@dmatveev please, take a look at the latest version |
|
@TolyaTalamanov any review from your end here? |
| explicit IEUnit(const cv::gapi::ie::detail::ParamDesc &pp) | ||
| : params(pp) { | ||
| InferenceEngine::ParamMap* ctx_params = | ||
| cv::util::any_cast<InferenceEngine::ParamMap>(¶ms.context_config); |
There was a problem hiding this comment.
so before making this cast at all, can you please check if any is not null?
There was a problem hiding this comment.
I don't think we can check if it's null besides casting it to something
There was a problem hiding this comment.
Under null I mean empty, but I see our any don't have has_value as defined in std
Please add a follow-up task
There was a problem hiding this comment.
Added a task
| if (ctx_params != nullptr) { | ||
| auto ie_core = cv::gimpl::ie::wrap::getCore(); | ||
| rctx = ie_core.CreateContext(params.device_id, *ctx_params); | ||
| } |
There was a problem hiding this comment.
and if it is not null and couldn't cast, we should probably print out a warning.
There was a problem hiding this comment.
I don't think we can check if it's null besides casting it to something
|
@dmatveev @TolyaTalamanov please, take a look and lets merge this as a first approximation |
dmatveev
left a comment
There was a problem hiding this comment.
Let's merge it, thanks.
| /** @brief Specifies configuration for RemoteContext in InferenceEngine. | ||
|
|
||
| When RemoteContext is configured the backend imports the networks using the context. | ||
| It also expects cv::MediaFrames to be actually remote, to operate with blobs via the context. |
There was a problem hiding this comment.
cv::MediaFrames -> input data.
G-API: Support remote inference * Extend MediaFrame to be able to extract additional info besides access * Add API for remote inference * Add default implementation for blobParams() * Add default implementation for blobParams() * Address review comments * Fix any_cast usage * Add comment on the default blobParams() * Address review comments * Add missing rctx * Minor fix * Fix indentation and comment * Address review comments * Add documentation
G-API: Support remote inference * Extend MediaFrame to be able to extract additional info besides access * Add API for remote inference * Add default implementation for blobParams() * Add default implementation for blobParams() * Address review comments * Fix any_cast usage * Add comment on the default blobParams() * Address review comments * Add missing rctx * Minor fix * Fix indentation and comment * Address review comments * Add documentation
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.