Load IR model from buffer#16034
Load IR model from buffer#16034opencv-pushbot merged 1 commit intoopencv:3.4from Quantizs:irLoadFromBuffer
Conversation
alalek
left a comment
There was a problem hiding this comment.
Rebased, reworked, added test.
Any objections about these names? |
|
@alalek, sorry. I missed this |
| * @returns Net object. | ||
| */ | ||
| CV_WRAP static | ||
| Net readFromModelOptimizerBuffer(const std::vector<uchar>& bufferModelConfig, const std::vector<uchar>& bufferWeights); |
There was a problem hiding this comment.
All the versions should have the same name: readFromModelOptimizer and readNetFromModelOptimizer.
There was a problem hiding this comment.
The same name is not good and should be avoided.
At least for bindings support.
"String" (bytes array in meaning of UTF-8 file path) and vector<uchar> (or other forms of bytes array) is similar things and bindings wrappers may convert between them.
readFromModelOptimizer should be called readFromModelOptimizerFile but it is too late.
What is about prefixes?
- "read" for files ("load" is also used, for example in objdetect module)
- "create" / "build" for buffers
There was a problem hiding this comment.
Here an example when bindings work correctly with Darknet model: #11104 (comment)
There was a problem hiding this comment.
I didn't say that they not working. My concern here is that overused overloading is not reliable.
Feel free to update patch (just keep eyes on documentation).
There was a problem hiding this comment.
@Quantizs, please change Net::readFromModelOptimizer* as well.
|
Hi, |
resolves #15578
Added implementations to load IR models from buffer