[G-API] Support generic infer overloads#19310
Conversation
…rloads-from-generic-infer
e4f78c9 to
c431b14
Compare
| * @brief G-API object used to collect network outputs | ||
| */ | ||
| struct GAPI_EXPORTS_W_SIMPLE GInferOutputs | ||
| using GInferOutputs = GInferOutputsTyped<cv::GMat>; |
There was a problem hiding this comment.
How to document these properly ?
There was a problem hiding this comment.
7e57e54 to
3bc1793
Compare
|
@dmatveev Could you take a look ? |
bd2af91 to
9d160db
Compare
smirnov-alexey
left a comment
There was a problem hiding this comment.
Looks good, didn't dive too deep though
3044e8a to
caf0284
Compare
…eric-infer-overloads
caf0284 to
d51d653
Compare
|
@rgarnov Have a look, please |
|
@AsyaPronina Have a look, please |
|
@rgarnov @AsyaPronina Have a look, please |
…eric-infer-overloads
|
@dmatveev Could you have a look ? |
| { | ||
| } | ||
|
|
||
| OutT at(const std::string& name) |
There was a problem hiding this comment.
is this method const? should it look like const?
There was a problem hiding this comment.
No, because it perform insert in map ?
| std::vector<std::string> out_names; | ||
| }; | ||
|
|
||
| template <typename OutT> |
There was a problem hiding this comment.
BTW what's the reason to have it generic?
Inference only produces Blobs which are GMat.
There was a problem hiding this comment.
Oh, looking at the code below, it seems I've got it.
Please make sure this type is under detail:: so end-users wouldn't think of using it directly.
There was a problem hiding this comment.
Ok I see it is under detail:: already
| } | ||
| private: | ||
| template<typename T> | ||
| struct Priv |
There was a problem hiding this comment.
Just wondering, do you really need a distinct T here in the nested type or it could refer to OutT directly (I believe it could)
There was a problem hiding this comment.
Good point, done
| cv::GInferInputs inputs; | ||
| inputs["data"] = in; |
There was a problem hiding this comment.
BTW can it be constructed like this?
auto inputs = cv::GInferInputs {
{"data", in},
...
};? This can be done separately, of course.
There was a problem hiding this comment.
I believe there is no difficulty to do this
|
@alalek Can it be merged ? |
f70bfd8 to
a5bcd84
Compare
…overloads [G-API] Support generic infer overloads * Overloads for generic infer * Fix build * Refactoring * Fix docs * Put extra stuff to detail namespace * Add doc for usings * Remove uneccessary template in Priv
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.
Build configuration