-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Can't import ONNX model produced by keras2onnx #20439
Copy link
Copy link
Closed
Labels
category: dnncategory: dnn (onnx)ONNX suport issues in DNN moduleONNX suport issues in DNN moduleneeds reproducerProvide complete minimal reproducer with input dataProvide complete minimal reproducer with input data
Description
System information (version)
- OpenCV(4.5.3-dev)
- Operating System / Platform => Ubuntu 20.04
- Compiler => gcc 9.3.0
Description of the issue:
I am using the caption model which is converted using keras2onnx. I am unable to load the model by using readNet or readNetFromONNX in opencv. And I have installed Opencv from source (OpenCV(4.5.3-dev)).
steps to reproduce :
Code is as below : (C++)
std::string Caption_Model = "Caption_Model.onnx";
cv::dnn::Net net = cv::dnn::readNetFromONNX(Caption_Model);
Error message:
Error : Node [Gather]:(embedding_1/Identity:0) parse error: OpenCV(4.5.3-dev) /opencv_build/opencv/modules/dnn/src/onnx/onnx_importer.cpp:356: error: (-5:Bad argument) Blob casted not found in const blobs in function 'getBlob'
Aborted (core dumped)
You can find the architecture of the caption model in the screenshot.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: dnncategory: dnn (onnx)ONNX suport issues in DNN moduleONNX suport issues in DNN moduleneeds reproducerProvide complete minimal reproducer with input dataProvide complete minimal reproducer with input data