chineseocr / darknet-ocr

darknet text detect and darknet cnn ocr
MIT License
1.14k stars 287 forks source link

CPU下识别一个图片需要大约3分钟,速度这么慢 #57

Open panjinya opened 4 years ago

panjinya commented 4 years ago

不知道是我环境有问题还是怎么了,为何识别速度如此慢啊?我感觉不太可能吧~~ 请问其他人是怎么样?

xiaotanlong commented 4 years ago

请问 你编译成功了吗,mkdir -p obj mkdir -p backup mkdir -p results gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/gemm.c -o obj/gemm.o In file included from ./src/utils.h:5:0, from ./src/gemm.c:2: include/darknet.h:11:14: fatal error: cuda_runtime.h: No such file or directory

include "cuda_runtime.h"

          ^~~~~~~~~~~~~~~~

compilation terminated. Makefile:89: recipe for target 'obj/gemm.o' failed make: *** [obj/gemm.o] Error 1

这个报错是什么原因呢?

panjinya commented 4 years ago

请问 你编译成功了吗,mkdir -p obj mkdir -p backup mkdir -p results gcc -Iinclude/ -Isrc/ -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DGPU -DCUDNN -c ./src/gemm.c -o obj/gemm.o In file included from ./src/utils.h:5:0, from ./src/gemm.c:2: include/darknet.h:11:14: fatal error: cuda_runtime.h: No such file or directory

include "cuda_runtime.h"

^~~~ compilation terminated. Makefile:89: recipe for target 'obj/gemm.o' failed make: *** [obj/gemm.o] Error 1

这个报错是什么原因呢?

我这没有这种错误啊,你检查下你工程里面cuda_runtime.h是否存在呢?

wenlihaoyu commented 4 years ago

要编译对GPU支持,要先安装CUDA

cmh360 commented 4 years ago

不知道是我环境有问题还是怎么了,为何识别速度如此慢啊?我感觉不太可能吧~~ 请问其他人是怎么样?

我的也是,cpu模式下很慢,大概8分钟。是哪款设置不对吗

zhaojun060708 commented 4 years ago

config.py 文件里的 GPU 改成 False 再试试

cmh360 commented 4 years ago

是的,改下就好了,多谢

------------------ 原始邮件 ------------------ 发件人: "Zhao Jun"<notifications@github.com>; 发送时间: 2020年2月19日(星期三) 下午3:59 收件人: "chineseocr/darknet-ocr"<darknet-ocr@noreply.github.com>; 抄送: "CMH"<184682902@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [chineseocr/darknet-ocr] CPU下识别一个图片需要大约3分钟,速度这么慢 (#57)

config.py 文件里的 GPU 改成 False 再试试

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

zhaojun060708 commented 4 years ago

是的,改下就好了,多谢 ------------------ 原始邮件 ------------------ 发件人: "Zhao Jun"<notifications@github.com>; 发送时间: 2020年2月19日(星期三) 下午3:59 收件人: "chineseocr/darknet-ocr"<darknet-ocr@noreply.github.com>; 抄送: "CMH"<184682902@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [chineseocr/darknet-ocr] CPU下识别一个图片需要大约3分钟,速度这么慢 (#57) config.py 文件里的 GPU 改成 False 再试试 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

我也是今天刚刚实验,我请教你个问题,你改完后效率大概多少?我改完后画框需要5秒,识别需要10秒,不过识别可以并行化,多谢

weilingfeng1996 commented 4 years ago

是的,改下就好了,多谢 ... ------------------原始邮件------------------发件人:“赵军” < notifications@github.com >; 发送时间:2020年2月19日(星期三)下午3:59收件人:“ chineseocr / darknet-ocr” < darknet-ocr@noreply.github.com >; 抄送:“ CMH” < 184682902@qq.com >; “评论” < comment@noreply.github.com >; 主题:回复:[chineseocr / darknet-ocr] CPU下识别一个图片需要大约3分钟,速度这么慢(#57)config.py文件里的GPU改成False再试试—您收到此内容是因为您评论了。直接回复此电子邮件,在GitHub上查看或取消订阅。

我也是今天刚刚实验,我请教你一个问题,你改完后效率大概多少?我改完后画框需要5秒,识别需要10秒,不过识别可以并行化,多谢 想问下识别如何并行化 针对 哪个函数进行并行识别

zlszhonglongshen commented 4 years ago

是的,改下就好了,多谢 ------------------ 原始邮件 ------------------ 发件人: "Zhao Jun"[notifications@github.com](mailto:notifications@github.com); 发送时间: 2020年2月19日(星期三) 下午3:59 收件人: "chineseocr/darknet-ocr"[darknet-ocr@noreply.github.com](mailto:darknet-ocr@noreply.github.com); 抄送: "CMH"[184682902@qq.com](mailto:184682902@qq.com); "Comment"[comment@noreply.github.com](mailto:comment@noreply.github.com); 主题: Re: [chineseocr/darknet-ocr] CPU下识别一个图片需要大约3分钟,速度这么慢 (#57) config.py 文件里的 GPU 改成 False 再试试 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

我也是今天刚刚实验,我请教你个问题,你改完后效率大概多少?我改完后画框需要5秒,识别需要10秒,不过识别可以并行化,多谢

你好,你现在测试的速度是多少,如果部署的话,感觉也是需要8-10秒吧。

zhaojun060708 commented 4 years ago

一张1000*1000的图像估计需要5秒钟吧