mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Add support for loading ONNX model from in-memory buffer.
This commit is contained in:
@@ -868,6 +868,23 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
|
||||
*/
|
||||
CV_EXPORTS_W Net readNetFromONNX(const String &onnxFile);
|
||||
|
||||
/** @brief Reads a network model from <a href="https://onnx.ai/">ONNX</a>
|
||||
* in-memory buffer.
|
||||
* @param buffer memory address of the first byte of the buffer.
|
||||
* @param sizeBuffer size of the buffer.
|
||||
* @returns Network object that ready to do forward, throw an exception
|
||||
* in failure cases.
|
||||
*/
|
||||
CV_EXPORTS Net readNetFromONNX(const char* buffer, size_t sizeBuffer);
|
||||
|
||||
/** @brief Reads a network model from <a href="https://onnx.ai/">ONNX</a>
|
||||
* in-memory buffer.
|
||||
* @param buffer in-memory buffer that stores the ONNX model bytes.
|
||||
* @returns Network object that ready to do forward, throw an exception
|
||||
* in failure cases.
|
||||
*/
|
||||
CV_EXPORTS_W Net readNetFromONNX(const std::vector<uchar>& buffer);
|
||||
|
||||
/** @brief Creates blob from .pb file.
|
||||
* @param path to the .pb file with input tensor.
|
||||
* @returns Mat.
|
||||
|
||||
Reference in New Issue
Block a user