Open mhm0902 opened 1 year ago
outnames : exist_col exist_row loc_col loc_row [ERROR:0@4.178] global net_impl.cpp:1164 cv::dnn::dnn4_v20221220::Net::Impl::getLayerShapesRecursively OPENCV/DNN: [Reshape]:(onnx_node!Reshape_48): getMemoryShapes() throws exception. inputs=1 outputs=1/1 blobs=0 [ERROR:0@4.179] global net_impl.cpp:1167 cv::dnn::dnn4_v20221220::Net::Impl::getLayerShapesRecursively input[0] = [ 1 8 10 25 ] [ERROR:0@4.179] global net_impl.cpp:1171 cv::dnn::dnn4_v20221220::Net::Impl::getLayerShapesRecursively output[0] = [ 1 4000 ] [ERROR:0@4.179] global net_impl.cpp:1177 cv::dnn::dnn4_v20221220::Net::Impl::getLayerShapesRecursively Exception message: OpenCV(4.7.0) D:\tools\opencv\opencv-4.7.0\modules\dnn\src\layers\reshape_layer.cpp:150: error: (-1:Backtrace) Can't infer a dim denoted by -1 in function 'cv::dnn::computeShapeByReshapeMask'
OpenCV: terminate handler is called! The last OpenCV error is: OpenCV(4.7.0) Error: Backtrace (Can't infer a dim denoted by -1) in cv::dnn::computeShapeByReshapeMask, file D:\tools\opencv\opencv-4.7.0\modules\dnn\src\layers\reshape_layer.cpp, line 150
已修复这个问题,opencv的c++代码已更新,在net.forward之前,需要添加net.enableWinograd(false);这一行,这是在使用opencv4.7的dnn时需要注意的。
现在还是有同样的报错呀
使用culane的两个权重就会报上面的错误,用tusimple就不会报错
outnames : exist_col exist_row loc_col loc_row [ERROR:0@4.178] global net_impl.cpp:1164 cv::dnn::dnn4_v20221220::Net::Impl::getLayerShapesRecursively OPENCV/DNN: [Reshape]:(onnx_node!Reshape_48): getMemoryShapes() throws exception. inputs=1 outputs=1/1 blobs=0 [ERROR:0@4.179] global net_impl.cpp:1167 cv::dnn::dnn4_v20221220::Net::Impl::getLayerShapesRecursively input[0] = [ 1 8 10 25 ] [ERROR:0@4.179] global net_impl.cpp:1171 cv::dnn::dnn4_v20221220::Net::Impl::getLayerShapesRecursively output[0] = [ 1 4000 ] [ERROR:0@4.179] global net_impl.cpp:1177 cv::dnn::dnn4_v20221220::Net::Impl::getLayerShapesRecursively Exception message: OpenCV(4.7.0) D:\tools\opencv\opencv-4.7.0\modules\dnn\src\layers\reshape_layer.cpp:150: error: (-1:Backtrace) Can't infer a dim denoted by -1 in function 'cv::dnn::computeShapeByReshapeMask'
OpenCV: terminate handler is called! The last OpenCV error is: OpenCV(4.7.0) Error: Backtrace (Can't infer a dim denoted by -1) in cv::dnn::computeShapeByReshapeMask, file D:\tools\opencv\opencv-4.7.0\modules\dnn\src\layers\reshape_layer.cpp, line 150