Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

east errors #3

Open
SpringRainLu opened this issue Nov 24, 2019 · 1 comment
Open

east errors #3

SpringRainLu opened this issue Nov 24, 2019 · 1 comment

Comments

@SpringRainLu
Copy link

i tried to run text detection.py based on my own east model, but it failed at
''outs = net.forward(outNames)''
cv2.error: OpenCV(4.1.1) .\opencv-python\opencv\modules\dnn\src\dnn.cpp:525: error: (-2:Unspecified error)
Can't create layer "resnet_v1_50/conv1/BatchNorm/FusedBatchNormV3" of type "FusedBatchNormV3" in function 'cv::dnn::dnn4_v20190621::LayerData::getLayerInstance'

i saved my model in this:

output_graph = "frozen_east_model_02.pb"
output_graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def,
["feature_fusion/Conv_7/Sigmoid",
"feature_fusion/concat_3"])
tf.train.write_graph(output_graph_def, ".", output_graph, as_text=False)

i have tried to modify model.py , nevertheless it did not work.

c1_1 = slim.conv2d(tf.concat([g[i-1], f[i]], axis=3), num_outputs[i], 1)
pi2 = 0.5 * np.pi
angle_map = (slim.conv2d(g[3], 1, 1, activation_fn=tf.nn.sigmoid, normalizer_fn=None) - 0.5) * pi2 # angle is between [-45, 45]
F_geometry = tf.concat([geo_map, angle_map], axis=3)

but the official east model.pb worked, what i did wrong?

@ZER-0-NE
Copy link
Owner

Interesting use. But I think it won't work (at least directly) with your custom model. The error clearly states Can't create layer "resnet_v1_50/conv1/BatchNorm/FusedBatchNormV3" of type "FusedBatchNormV3" in function 'cv::dnn::dnn4_v20190621::LayerData::getLayerInstance' .

This issue has been up for a long time and I'd like to know if you've resolved this? @SpringRainLu . If so, please consider adding some additional information for future developers.

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants