eragonruan / text-detection-ctpn

text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network
MIT License
3.43k stars 1.33k forks source link

ValueError: None values not supported #438

Open sneha-rudra opened 4 years ago

sneha-rudra commented 4 years ago

How to fix this error? I am running this on CPU

Traceback (most recent call last): File "main/demo.py", line 123, in tf.app.run() File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main/demo.py", line 68, in main bbox_pred, cls_pred, cls_prob = model.model(input_image) File "/Users/user1/Desktop/TextDetectionInImages/text-detection-ctpn/nets/model_train.py", line 72, in model lstm_output = Bilstm(rpn_conv, 512, 128, 512, scope_name='BiLSTM') File "/Users/user1/Desktop/TextDetectionInImages/text-detection-ctpn/nets/model_train.py", line 33, in Bilstm lstm_out, last_state = tf.nn.bidirectional_dynamic_rnn(lstm_fw_cell, lstm_bw_cell, net, dtype=tf.float32) File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 363, in bidirectional_dynamic_rnn seq_dim=time_dim, batch_dim=batch_dim) File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 2346, in reverse_sequence name=name) File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2776, in reverse_sequence batch_dim=batch_dim, name=name) File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 504, in apply_op values, as_ref=input_arg.is_ref).dtype.name File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 716, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 176, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 165, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "/Users/user1/Desktop/TextDetectionInImages/venv/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 360, in make_tensor_proto raise ValueError("None values not supported.") ValueError: None values not supported.

zjjhuihui commented 3 years ago

I have the same question for answers