CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
G-API: Support remote inference #20156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR: #20151 has to be merged first |
@dmatveev @TolyaTalamanov @rgarnov @AsyaPronina please, review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of the diff seems to be mediaframe extension-related
@dmatveev please, take a look at the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so before making this cast at all, can you please check if any
is not null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can check if it's null besides casting it to something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and if it is not null and couldn't cast, we should probably print out a warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can check if it's null besides casting it to something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
@dmatveev @TolyaTalamanov please, take a look and lets merge this as a first approximation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.