CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Expand ie::Params to support config #18701
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
Expand ie::Params to support config #18701
Conversation
b71d343
to
45c86e5
Compare
@rgarnov @anton-potapov Could you have a look, please ? |
@rgarnov @anton-potapov please prioritize |
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.
Looks good
model_path, | ||
weights_path, | ||
device_id, | ||
{{"unsupported_config", "some_value"}}}; |
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.
No. Putting everything to a cosntructor bloats up everything.
I'd expect to see
pp.cfgPlugin(map);
or even
pp
.cfgPlugin("key", "value")
.cfgPlugin("key", "value")
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.
Fixed
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 propose to change the method name to setCfg
or something similar. cfgPlugin
looks like it expects some plugin name at input and may be misleading. In its turn setCfg
can conflict with cfgInputs/Outputs
though since there are different meanings of cfg
in these names
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.
we have all other methods starting with cfg
, and via this you configure plugin, though I agree it doesn't look very good
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.
hmm... except constInput()
. :)
Maybe .pluginConfig
is what we need - but it can always be added atop.
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.
setPluginConfig()
and getPluginConfig()
(optional, but can be used in tests)
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.
Ok, rename to pluginConfig
45c86e5
to
73d5a6f
Compare
73d5a6f
to
b9604da
Compare
auto gender = outputs.at("prob"); | ||
cv::GComputation comp(cv::GIn(in), cv::GOut(age, gender)); | ||
|
||
auto pp = cv::gapi::ie::Params<cv::gapi::Generic>{"age-gender-generic", |
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.
would not this test should be extended to test generic version of 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.
It is already generic
, is it ?
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 tests on non-generic
device_id}.pluginConfig({{"unsupported_config", "some_value"}}); | ||
|
||
EXPECT_ANY_THROW(comp.compile(cv::GMatDesc{CV_8U,3,cv::Size{320, 240}}, | ||
cv::compile_args(cv::gapi::networks(pp)))); |
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.
BTW is it possible to create positive test ?
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.
For which option, for example ?
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 test
@anton-potapov Could you have a look, please ? |
@dmatveev @rgarnov @anton-potapov Can it be merged today ? |
Approved, but @alalek is who merges.:) |
|
||
auto pp = cv::gapi::ie::Params<AgeGender> { | ||
model_path, weights_path, device_id | ||
}.cfgOutputLayers({ "age_conv3", "prob" }).pluginConfig({{"ENFORCE_BF16", "NO"}}); |
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.
[ FAILED ] 2 tests, listed below:
[ FAILED ] TestAgeGenderIE.CPUConfigGeneric
[ FAILED ] TestAgeGenderIE.CPUConfig
with message
Exception message: [NOT_FOUND] Unsupported property ENFORCE_BF16 by CPU plugin
CPU is i7-6700K
.
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.
Caused by old build_image:Custom Win=openvino-2020.3.0
.
It is OpenVINO LTS version so it is better to add handling for that (replace property or skip test).
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.
Thanks! I'll replace option asap
@TolyaTalamanov can you please update our wiki, too? |
…ig-for-ie-params Expand ie::Params to support config * Add config to IE params * Add test * Remove comments from tests * Rename to pluginConfig * Add one more overloads for pluginConfig * Add more tests
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.