c++ dnn text detection cpp sample with https://github.com/MaybeShewill-CV/CRNN_Tensorflow

asked 2020-07-27 13:22:35 -0500

hi i am trying to run dnn/text_detection.cpp,

while detector is working fine, but crnn model is not much accurate i tried to train this recognition model https://github.com/meijieru/crnn.pytorch with my custom image set but there is some warpctc installation error, so i checked one more crnn model https://github.com/MaybeShewill-CV/CR... with this i can run inference in python and accuracy is also good. so i am trying to implement this with this dnn/text_detection.cpp sample but i am getting some error

[ERROR:0] global C:\jenkins\workspace\OpenCV\OpenVINO\2020.3\build\windows\opencv\modules\dnn\src\dnn.cpp (3272) cv::dnn::dnn4_v20200310::Net::Impl::getLayerShapesRecursively OPENCV/DNN: []:(_input): getMemoryShapes() throws exception. inputs=1 outputs=0/0 blobs=0
[ERROR:0] global C:\jenkins\workspace\OpenCV\OpenVINO\2020.3\build\windows\opencv\modules\dnn\src\dnn.cpp (3275) cv::dnn::dnn4_v20200310::Net::Impl::getLayerShapesRecursively input[0] = [ 1 1 100 32 ]
[ERROR:0] global C:\jenkins\workspace\OpenCV\OpenVINO\2020.3\build\windows\opencv\modules\dnn\src\dnn.cpp (3285) cv::dnn::dnn4_v20200310::Net::Impl::getLayerShapesRecursively Exception message: OpenCV(4.3.0-openvino-2020.3.0) C:\jenkins\workspace\OpenCV\OpenVINO\2020.3\build\windows\opencv\modules\dnn\src\dnn.cpp:790: error: (-215:Assertion failed) inputs.size() == requiredOutputs in function 'cv::dnn::dnn4_v20200310::DataLayer::getMemoryShapes'

OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(4.3.0-openvino-2020.3.0) Error: Assertion failed (inputs.size() == requiredOutputs) in cv::dnn::dnn4_v20200310::DataLayer::getMemoryShapes, file C:\jenkins\workspace\OpenCV\OpenVINO\2020.3\build\windows\opencv\modules\dnn\src\dnn.cpp, line 790

can anyone please have a look

with the below link i generated a frozen_graph.pb , that i am using in dnn/text_detection.cpp https://docs.openvinotoolkit.org/2020... while creating forzen_graph i have changed the layer name in step 3

frozen = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['shadow_net/sequence_rnn_module/stack_bidirectional_rnn/cell_0/bidirectional_rnn/fw/fw/while/Identity_2'])

here is the model i have created, checkpoint files and saved_model https://drive.google.com/drive/folder...

edit retag flag offensive close merge delete