felixbrave / ocr_chinese Goto Github PK
View Code? Open in Web Editor NEW图像文字检测模型(EAST/AdvancedEAST),及包含文字识别模型(CRNN+CTC),Keras/TensorFlow实现.
图像文字检测模型(EAST/AdvancedEAST),及包含文字识别模型(CRNN+CTC),Keras/TensorFlow实现.
Traceback (most recent call last):
File "/Users/hexi/Desktop/数字人文/demo/ocr_chinese-master/predict.py", line 73, in
texts = predict_text(crnn_model, text_recs_all, text_recs_len, img_all, img_name=im_name)
File "/Users/hexi/Desktop/数字人文/demo/ocr_chinese-master/crnn/predict_crnn.py", line 125, in predict_text
img_rec = dumpRotateImage(img_all[img_index], recs_all[i]).convert('L')
File "/Users/hexi/Desktop/数字人文/demo/ocr_chinese-master/crnn/predict_crnn.py", line 94, in dumpRotateImage
img_rec = img_rot.crop((pt1_N[0], pt1_N[1], pt3_N[0], pt3_N[1]))
File "/Users/hexi/miniforge3/envs/mini_envs/lib/python3.8/site-packages/PIL/Image.py", line 1207, in crop
raise ValueError("Coordinate 'right' is less than 'left'",box)
ValueError: ("Coordinate 'right' is less than 'left'", (596, 450, 561, 432))
你好,我看写的环境是gpu,请问该项目支持cpu吗
请问训练的数据集是什么呢?能否给提供一份呢?
大佬您好,我是初学者,对于cfg中的origin_image_dir_name, origin_txt_dir_name, train_image_dir_name, train_label_dir_name应该怎么理解,因为我看您上传的数据集都是train image和label,我就没搞懂这个origin是怎么用的
1、在百度云下载链接里,有个 vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5 的文件,应该放在哪个目录中?
2、在运行 predict.py 时,报错“FileNotFoundError: [Errno 2] No such file or directory: './east/test/temp/100_0_.jpg'”,应该怎么处理。
非常期待你的回复,谢谢!
Traceback (most recent call last):
File "D:/google/ocr_chinese-master/ocr_chinese-master/predict.py", line 34, in
crnn_model.load_weights(crnn_model_weights_file)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\keras\engine\topology.py", line 2667, in load_weights
f, self.layers, reshape=reshape)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\keras\engine\topology.py", line 3393, in load_weights_from_hdf5_group
K.batch_set_value(weight_value_tuples)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\keras\backend\tensorflow_backend.py", line 2372, in batch_set_value
assign_op = x.assign(assign_placeholder)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\tensorflow\python\ops\variables.py", line 1952, in assign
name=name)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\tensorflow\python\ops\state_ops.py", line 227, in assign
validate_shape=validate_shape)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\tensorflow\python\ops\gen_state_ops.py", line 69, in assign
use_locking=use_locking, name=name)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 3616, in create_op
op_def=op_def)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 2027, in init
control_input_ops)
File "D:\music\annnacoda\an\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 1867, in _create_c_op
raise ValueError(str(e))
ValueError: Dimension 1 in both shapes must be equal, but are 11889 and 5990. Shapes are [512,11889] and [512,5990]. for 'Assign_110' (op: 'Assign') with input shapes: [512,11889], [512,5990].
请问如何解决呢
两种方法预测:
1.代码里原始那种:生成east模型,然后load_weights()加上权重文件,去预测
2.使用east生成模型,load_weights加上权重文件,保存成一个新的模型,预测时使用keras.models.load_model进行读取新模型,然后预测没有效果
你知道怎么回事么
Where can I download the pre-trained checkpoint files? Please give an link.
Cannot assign value to variable ' blstm2_out/kernel:0': Shape mismatch.The variable shape (512, 1), and the assigned value shape (512, 5990) are incompatible.用的您分享的权重文件
运行predict.py,提示这个,然后运行一段时间就不动了,
A local file was found, but it seems to be incomplete or outdated because the auto file hash does not match the original value of 6d6bbae143d832006294945121d1f1fc so we will re-download the data.
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5
27975680/58889256 [=============>................] - ETA: 22:29
27992064/58889256 [=============>................] - ETA: 22:28
28016640/58889256 [=============>................] - ETA: 22:26
28033024/58889256 [=============>................] - ETA: 22:25
28049408/58889256 [=============>................] - ETA: 22:24
28065792/58889256 [=============>................] - ETA: 22:24
28082176/58889256 [=============>................] - ETA: 22:23
28098560/58889256 [=============>................] - ETA: 22:22
28114944/58889256 [=============>................] - ETA: 22:21
28131328/58889256 [=============>................] - ETA: 22:20
28155904/58889256 [=============>................] - ETA: 22:18
28172288/58889256 [=============>................] - ETA: 22:17
28188672/58889256 [=============>................] - ETA: 22:16
28205056/58889256 [=============>................] - ETA: 22:15
28221440/58889256 [=============>................] - ETA: 22:14
28237824/58889256 [=============>................] - ETA: 22:13
28254208/58889256 [=============>................] - ETA: 22:12
28270592/58889256 [=============>................] - ETA: 22:11
作者你好,我想请问crnn里network中的char_file的txt文件是什么?
Please tell me In the "gen" function in this file,where is the _gt.npy file? Only txt file appear in training data.
这个文件中的gen函数中的 _gt.npy文件是怎么回事呢?训练文件中只有 txt文件
请问作者是否有在其他数据集上线进行预训练呢
跑测试east没报错,但结果一直是quad invalid with vertex num less then 4.
我是报这个错误
ValueError: Dimension 1 in both shapes must be equal, but are 5994 and 5990. Shapes are [512,5994] and [512,5990]. for 'Assign_110' (op: 'Assign') with input shapes: [512,5994], [512,59 90]
Hi!
I have already trained the model for EAST. But I have no idea about training CRNN. Chould you please give me some suggestions on that?
作者您好,请问一下应该怎么训练CRNN的模型?可以麻烦指导一下吗?
east_model_weights_3T736.h5 这个文件需要怎么样训练获得
作者方便给我一份你的qq或者微信的联系方式吗?我最近在做毕业设计,想寻求您一些帮助,我的邮箱是[email protected]
if it's convenient for you to provide the training set,i want to train this model myself for better understanding! Look forward to your reply~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.