簡體   English   中英

用OpenCL加速Tesseract

[英]Speeding up Tesseract with OpenCL

我已經使用選項OpenCL從源代碼構建了Tesseract,以加快執行GetUTF8Text()所需的時間。 我按照以下步驟操作:

cd tesseract-3.03/
./autogen.sh
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure --enable-opencl
make 
sudo make install 

但是,當我運行使用Tesseract的代碼時,與使用沒有啟用OpenCL選項的Tesseract相比,我無法體驗任何加速。 我在這里錯過了什么嗎? 我是否應該對Tesseract來源進行一些更改?

我有同樣的問題。 我能夠找出我的設備是否與此代碼答案兼容。

如果您的設備不兼容OpenCL,則上述代碼將返回(null)分數以及分析時間。

此外,您確保克隆最新版本的tesseract(3.04.00)源,因為他們可能已修復您在其最新版本中遇到的錯誤。

無論如何,我不確定OpenCL是否會加速測試:

在這里,您可以使用nvidia opencl驅動程序,amd opencl驅動程序(通過CPU)和本機tesseract處理器進行快速測試。

[DS] Device[1] 1:GeForce GTX 960 score is 0.140693
[DS] Device[2] 1:AMD FX(tm)-8350 Eight-Core Processor score is 0.751782
[DS] Device[3] 0:(null) score is 0.891833


[DS] Selected Device[1]: "GeForce GTX 960" (OpenCL)
real    0m3.385s
user    0m2.872s
sys     0m0.476s

[DS] Overridden Device[2]: "AMD FX(tm)-8350 Eight-Core Processor" (OpenCL)
real    0m3.581s
user    0m6.700s
sys     0m0.188s

[DS] Overridden Device[3]: "(null)" (Native)
real    0m3.307s
user    0m3.144s
sys     0m0.160s

可能你沒有合適的電路板。 看看所有OpenCL符合標准的電路板

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM