chineseocr / darknet-ocr Goto Github PK
View Code? Open in Web Editor NEWdarknet text detect and darknet cnn ocr
License: MIT License
darknet text detect and darknet cnn ocr
License: MIT License
采用cpu 识别结果正常,采用gpu则没有识别到。无异常log输出。环境为多卡gtx1080ti GPU,ubuntu16
223.73.120.86:30801 - - [14/Oct/2019 11:43:45] "HTTP/1.1 POST /text" - 500 Internal Server Error
Traceback (most recent call last):
File "/opt/miniconda3/envs/darknet-ocr/lib/python3.6/site-packages/web/application.py", line 257, in process
return self.handle()
File "/opt/miniconda3/envs/darknet-ocr/lib/python3.6/site-packages/web/application.py", line 248, in handle
return self._delegate(fn, self.fvars, args)
File "/opt/miniconda3/envs/darknet-ocr/lib/python3.6/site-packages/web/application.py", line 488, in _delegate
return handle_class(cls)
File "/opt/miniconda3/envs/darknet-ocr/lib/python3.6/site-packages/web/application.py", line 466, in handle_class
return tocall(*args)
File "app.py", line 83, in POST
res = job(uuid,url,imgString,iscut,isclass,billModel,ip)
File "app.py", line 34, in job
boxes,scores = detect_lines(image,scale=scale,maxScale=maxScale)
File "/opt/darknet-ocr/dnn/text.py", line 48, in detect_lines
scores,boxes,rate,w,h = detect_box(image,scale,maxScale)
File "/opt/darknet-ocr/dnn/text.py", line 22, in detect_box
out = textNet.forward(outputName)[0]
cv2.error: OpenCV(4.0.0) /io/opencv/modules/dnn/src/layers/concat_layer.cpp:95: error: (-201:Incorrect size of input array) Inconsistent shape for ConcatLayer in function 'getMemoryShapes'
环境:
ubuntu 16.04 amd64
1、采用cygwin make好darknet并部署
2、pip安装了库
python app.py 8080 后,命令行直接退出,无任何提示,浏览器无法访问,
请问有人遇到过吗?
访问识别页面,上传图片之后,出来的结果是乱码,序号和值是正常的,leable里面的数据是乱码
大神,您好:
大概测试了一下,cpu版本是没有问题的,
但gpu版本在运行时,会报:: Unknown error 1362440885 的错误,程序退出。
初步定位了下,是在:dnn/text.py 的14行:
textNet = load_net(textPath.replace('.weights','.cfg').encode(),textPath.encode(), 0)
运行这一步时,报的错, 没有其他输出信息。
请问这个是什么原因导致的? 谢谢。
make: *** No rule to make target 'obj', needed by 'all'. Stop.
@wenlihaoyu @chineseocr 麻烦问一下有身份证、营业执照、护照的相关数据集吗?谢谢
--2020-01-08 23:18:08-- http://www.chineseocr.com:9990/static/models/darknet-ocr/models/ocr/chinese/ocr.weights
Resolving www.chineseocr.com... 59.110.234.163
Connecting to www.chineseocr.com|59.110.234.163|:9990... connected.
HTTP request sent, awaiting response... 404 File not found
2020-01-08 23:18:08 ERROR 404: File not found.
您好!您用了多少数据进行的训练,有训练数据吗?
如题
Windows10, Python 3.5.2 直接上传本地图片 /test/orc.jpeg
提示:识别异常
cmd窗口 log 如下:
python app.py 8080
http://0.0.0.0:8080/
127.0.0.1:58197 - - [13/Oct/2019 21:18:50] "HTTP/1.1 GET /text" - 200 OK
127.0.0.1:58200 - - [13/Oct/2019 21:18:50] "HTTP/1.1 GET /static/css/main.css" - 304 Not Modified
127.0.0.1:58198 - - [13/Oct/2019 21:18:50] "HTTP/1.1 GET /static/js/jquery.js" - 304 Not Modified
127.0.0.1:58199 - - [13/Oct/2019 21:18:50] "HTTP/1.1 GET /static/js/helps.js" - 304 Not Modified
127.0.0.1:58197 - - [13/Oct/2019 21:18:50] "HTTP/1.1 GET /static/img/loading.gif" - 304 Not Modified
Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\web.py-0.40-py3.5.egg\web\application.py", line 289, in process
return self.handle()
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\web.py-0.40-py3.5.egg\web\application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\web.py-0.40-py3.5.egg\web\application.py", line 530, in delegate
return handle_class(cls)
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\site-packages\web.py-0.40-py3.5.egg\web\application.py", line 508, in handle_class
return tocall(*args)
File "app.py", line 73, in POST
data = json.loads(data)
File "C:\Users\admin\AppData\Local\Programs\Python\Python35\lib\json_init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'
127.0.0.1:58197 - - [13/Oct/2019 21:19:00] "HTTP/1.1 POST /text" - 500 Internal Server Error
AttributeError: 'cv2.dnn_Net' object has no attribute 'getUnconnectedOutLayersNames'
Ubuntu 16.04
python3.7
无GPU,编译好了darknet,config也设置了darkRoot
测试运行dnn/ocr.py 报错Unknown error 47391493
定位错误是在dnn/ocr.py 23行 ocrNet = load_net(ocrPath.replace('.weights','.cfg').encode(),ocrPath.encode(), 0)
看到更新了ocr识别的模型,马上拿来用一下,自己是windows10的系统,也没有gpu,但是在编译的时候出错了,我电脑上装的MinGW来make的,请问windows系统应该怎么编译呢 是不是要改一下makefile文件,谢谢哈,或者是否可以将build好的library也直接传上来下载后直接用呢
E:\pycharm_workspace\darknet-ocr-master\darknet>make
make: *** No rule to make target 'obj', needed by 'all'. Stop.
大佬你的数据集是生成么,如果是请指点一下生成所需要考虑到的细节因素,还有您使用字符集是多少个的、有没有使用专业语料库之类的
I run app.py but it is a error, how to solve it? Thanks
OSError: dlopen(darknet/libdarknet.so, 10): image not found
新手小白,求问 怎么编译CPU版本?多谢
Traceback (most recent call last):
File "app.py", line 14, in
from dnn.text import detect_lines
File "/home/wanghe/darknet-ocr/dnn/text.py", line 13, in
from dnn.darknet import load_net,predict_image,array_to_image
File "/home/wanghe/darknet-ocr/dnn/darknet.py", line 112, in
predict_image =lib.network_predict_image_vgg
File "/usr/lib64/python3.6/ctypes/init.py", line 356, in getattr
func = self.getitem(name)
File "/usr/lib64/python3.6/ctypes/init.py", line 361, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: ../darknet/libdarknet.so: undefined symbol: network_predict_image_vgg
this is my error,i git clone darknet and make it,then exec /bin/python3 app.py 8080
i make the darknet-ocr,but it does not work,prompt make: *** There are no rules to create the target "obj" required by "all". stop
请问作者在这个darknet-ocr项目中是准备放弃yolo3来检测文字了吗?
如果确实如此,请问是出于什么考虑,方便介绍一下吗,感谢。
如标题,文字区域捕捉准确率与识别效果方面,感觉chineseocr项目更好。
怎样做数据标注,和训练
Python version 3.7.1, web.py==0.40.dev0
problem
I got this problem above,
temporary solution
open this file lib/site-packages/web/httpserver.py
Add:
self.directory = os.getcwd()
After:
self.start_response = start_response
请问,您训练师印刷体文字和手写体文字的比例大概是多少,还有您数据集里有自己生成数据的比例大概有多少,谢谢~~
您好!请问如何提高检测速度呢?
cd darknet && cp Makefile-GPU Makefile && make
make: *** No rule to make target 'obj', needed by 'all'. Stop.
你好,请问英文OCR模型能否上传测试?谢谢
python web 8080 段端口在哪个文件修改?
$ python3 app.py 8080
app.py:81: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 'uuid' is not None and (url is not None or imgString is not None):
Traceback (most recent call last):
File "app.py", line 14, in
from dnn.text import detect_lines
File "/Users/akore/Downloads/darknet-ocr-master/dnn/text.py", line 13, in
from dnn.darknet import load_net,predict_image,array_to_image
File "/Users/akore/Downloads/darknet-ocr-master/dnn/darknet.py", line 112, in
predict_image =lib.network_predict_image_vgg
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ctypes/init.py", line 382, in getattr
func = self.getitem(name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ctypes/init.py", line 387, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x7ff287681f10, network_predict_image_vgg): symbol not found
(base) xxxx@ubuntu:~/darknet-ocr-master$ python app.py 8080
Traceback (most recent call last):
File "app.py", line 14, in
from dnn.text import detect_lines
File "/home/xxx/darknet-ocr-master/dnn/text.py", line 13, in
from dnn.darknet import load_net,predict_image,array_to_image
File "/home/xxx/darknet-ocr-master/dnn/darknet.py", line 112, in
predict_image =lib.network_predict_image_vgg
File "/home/xxx/anaconda3/lib/python3.6/ctypes/init.py", line 357, in getattr
func = self.getitem(name)
File "/home/xxx/anaconda3/lib/python3.6/ctypes/init.py", line 362, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: ../darknet/libdarknet.so: undefined symbol: network_predict_image_vgg
多方查找资料,也多次编译darknet但问题依然,请指导,非常感谢
您好!
请问您的训练代码打算什么时候开源 谢谢
测试了几个系统,识别结果都出现乱码。
请问下开发时候的系统环境。
127.0.0.1:48050 - - [14/Jan/2020 18:12:47] "HTTP/1.1 POST /text" - 500 Internal Server Error
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.5/site-packages/web/application.py", line 289, in process
return self.handle()
File "/home/ubuntu/.local/lib/python3.5/site-packages/web/application.py", line 280, in handle
return self._delegate(fn, self.fvars, args)
File "/home/ubuntu/.local/lib/python3.5/site-packages/web/application.py", line 530, in _delegate
return handle_class(cls)
File "/home/ubuntu/.local/lib/python3.5/site-packages/web/application.py", line 508, in handle_class
return tocall(*args)
File "app.py", line 66, in POST
data = json.loads(data)
File "/usr/lib/python3.5/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'
127.0.0.1:48236 - - [14/Jan/2020 18:13:35] "HTTP/1.1 POST /text" - 500 Internal Server Error
array([[ 69.375 , 70.10526316, 244.63815789, 68.64473684,
244.63815789, 101.50657895, 69.375 , 102.23684211],
[ 69.375 , 163.57894737, 361.48026316, 164.30921053,
361.48026316, 198.63157895, 69.375 , 197.90131579],
[ 57.69078947, 341.03289474, 595.16447368, 342.49342105,
595.16447368, 378.27631579, 57.69078947, 376.81578947],
[361.48026316, 249.75 , 384.84868421, 249.75 ,
384.84868421, 274.57894737, 361.48026316, 274.57894737],
[ 57.69078947, 213.96710526, 420.63157895, 221.26973684,
419.90131579, 254.86184211, 56.96052632, 247.55921053],
[ 45.27631579, 119.76315789, 314.74342105, 116.11184211,
315.47368421, 148.97368421, 46.00657895, 152.625 ],
[116.11184211, 248.28947368, 303.78947368, 252.67105263,
303.05921053, 284.07236842, 115.38157895, 280.42105263]])
这个坐标顺序是什么呢?
至于分类模型, dnn'跑报错:Relu不支持,作者确定测试过opencv dnn模块可以运行ocr吗?
<1>在src中的network.cu中1005行:
void sync_n
ets(network **nets, int n, int interval)
正确应该为:void sync_nets(network **nets, int n, int interval)
<2>在src中的maxpool_layer_kernels.cu中36,37行:
int cur_h = h_offset + istride[0] + l;
int cur_w = w_offset + jstride[1] + m;
正确应为:
int cur_h = h_offset + istrideh + l;
int cur_w = w_offset + jstridew + m;
<3>在src中的maxpool_layer_kernels.cu中55行:
int area = (size-1)/stride;
这个stride到底是strideh 还是stridew ,我也蒙圈了
请问有没有纯数字的ocr模型,主要用于识别印刷体照片扫描件。
或则能否提供生成数据的方法
env:
python 3.7.1
web.py==0.40.dev0
problem:
return Template(open(path).read(), filename=path, **self._keywords)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 410: illegal multibyte sequence
temporary solution
open the file lib\site-packages\web\template.py
old: return Template(open(path).read(), filename=path, **self._keywords)
new: return Template(open(path,encoding='utf-8').read(), filename=path, **self._keywords)
推荐Apache 或 MIT协议
感觉启动后好多问题都是在templates/text.htm 中的python格式各种语法报错
我的是mac的3.8的python,跑起来比较艰难
版主您好,我點進模型文建下載時百度網盤說網頁不存在了,不知道是不是地區的關係從來沒有一次從百度網盤下在成功,方便提供其他的載點嗎,謝謝!
作者你好,想问一下ocr.cfg该如何使用呢,训练数据是怎样标注的?
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.