Closed cucibala closed 1 week ago
Please try v1.0 again
v1.0 Error
Can you try PR #23 ?
Now it's OK, but I'm having trouble switching to another model
can you share the xml or this model? (bin is not required), or you can share a small snippet around this operator: NormalizeL2_22659
I sent an email to your mailbox
Thank you! I fix in #27 please have a try!
When I load a model using OpenCV, I get the following error
OpenCV(4.5.4) F:\repos\opencv-4.5.4\modules\dnn\src\onnx\onnx_importer.cpp:739: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20211004::ONNXImporter::handleNode'
Node [Conv]:(Convolution_21635_output2) parse error: OpenCV(4.5.4) F:\repos\opencv-4.5.4\modules\dnn\src\layers\layers_common.cpp:106: error: (-5:Bad argument) kernel_size (or kernel_h and kernel_w) not specified in function 'cv::dnn::util::getKernelSize'
what about onnxruntime? can you check onnxruntime_test model.onnx 1
Thank you! I fix in #27 please have a try!
The conversion is successful, but using onnxruntime to load will give an error,
what about onnxruntime? can you check
onnxruntime_test model.onnx 1
For a quick validation on OnnxRuntime, can you modify your xml as follows?:
From
<layer id="707" name="Result_22666" type="Result" version="opset1">
<input>
<port id="0">
<dim>1</dim>
<dim>128</dim>
</port>
</input>
</layer>
To
<layer id="707" name="Result_22666" type="Result" version="opset1">
<input>
<port id="0" precision="FP32">
<dim>1</dim>
<dim>128</dim>
</port>
</input>
</layer>
When I load a model using OpenCV, I get the following error
OpenCV(4.5.4) F:\repos\opencv-4.5.4\modules\dnn\src\onnx\onnx_importer.cpp:739: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20211004::ONNXImporter::handleNode'
Node [Conv]:(Convolution_21635_output2) parse error: OpenCV(4.5.4) F:\repos\opencv-4.5.4\modules\dnn\src\layers\layers_common.cpp:106: error: (-5:Bad argument) kernel_size (or kernel_h and kernel_w) not specified in function 'cv::dnn::util::getKernelSize'
For OpenCV, it seems it needs kernel_shape
attribute while it is not a mandatory attribute as onnx describes here.
kernel_shape - INTS : The shape of the convolution kernel. If not present, should be inferred from input W.
For a quick validation on OnnxRuntime, can you modify your xml as follows?:
From
<layer id="707" name="Result_22666" type="Result" version="opset1"> <input> <port id="0"> <dim>1</dim> <dim>128</dim> </port> </input> </layer>
To
<layer id="707" name="Result_22666" type="Result" version="opset1"> <input> <port id="0" precision="FP32"> <dim>1</dim> <dim>128</dim> </port> </input> </layer>
cause another error
root caused, will fix this issue
When I load a model using OpenCV, I get the following error OpenCV(4.5.4) F:\repos\opencv-4.5.4\modules\dnn\src\onnx\onnx_importer.cpp:739: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20211004::ONNXImporter::handleNode'
Node [Conv]:(Convolution_21635_output2) parse error: OpenCV(4.5.4) F:\repos\opencv-4.5.4\modules\dnn\src\layers\layers_common.cpp:106: error: (-5:Bad argument) kernel_size (or kernel_h and kernel_w) not specified in function 'cv::dnn::util::getKernelSize'
For OpenCV, it seems it needs
kernel_shape
attribute while it is not a mandatory attribute as onnx describes here.kernel_shape - INTS : The shape of the convolution kernel. If not present, should be inferred from input W.
I converted the model, but I still get the same error
For invalid data type 0
, keep the change of xml, it suppose to deduce the correct data type automatically
it's done, thanks