xulihang / ImageTrans-docs

Documentation of ImageTrans, a computer-aided image translation tool. ImageTrans的文档项目。ImageTrans是一款计算机辅助图片/漫画翻译软件。
https://imagetrans.readthedocs.io/
85 stars 8 forks source link

在使用imgagetrans2.12.2时ocrspace简体中文文字提取时遇到的报错 #653

Closed YOuKn0wHOw closed 3 months ago

YOuKn0wHOw commented 4 months ago

error: java.lang.RuntimeException: Object should first be initialized (Map). StackTrace: java.lang.RuntimeException: Object should first be initialized (Map). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:32) at anywheresoftware.b4a.objects.collections.Map.Get(Map.java:67) at org.xulihang.imagetrans.ocr$ResumableSub_ocrspace.resume(ocr.java:3954) at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:136) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:85) at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:487) at anywheresoftware.b4a.keywords.Common.access$0(Common.java:467) at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:541) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)

xulihang commented 4 months ago

OCRSpace在做全图OCR时容易失败,可以改用别的OCR引擎。比如WinRT,是OCRSpace的离线版。

YOuKn0wHOw commented 4 months ago

我在用winrt的时候时不时也会出现无效的状态,请问这个需要额外设置什么吗?

------------------ 原始邮件 ------------------ 发件人: "xulihang/ImageTrans-docs" @.>; 发送时间: 2024年5月23日(星期四) 下午4:53 @.>; @.**@.>; 主题: Re: [xulihang/ImageTrans-docs] 在使用imgagetrans2.12.2时ocrspace简体中文文字提取时遇到的报错 (Issue #653)

OCRSpace在做全图OCR时容易失败,可以改用别的OCR引擎。比如WinRT,是OCRSpace的离线版。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

xulihang commented 4 months ago

WinRT失败我没碰到过。可以把图片发过来我试一下

YOuKn0wHOw commented 4 months ago

就比如这张吧,识别出乱码,有时框都不建立,我使用时成功率大概在5成左右

------------------ 原始邮件 ------------------ 发件人: "xulihang/ImageTrans-docs" @.>; 发送时间: 2024年5月23日(星期四) 下午5:05 @.>; @.**@.>; 主题: Re: [xulihang/ImageTrans-docs] 在使用imgagetrans2.12.2时ocrspace简体中文文字提取时遇到的报错 (Issue #653)

WinRT失败我没碰到过。可以把图片发过来我试一下

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

xulihang commented 4 months ago

看不到图。WinRT的语言有选对吗?它需要系统自身有安装对应的语言。

image

离线OCR里识别中文比较好的是PaddleOCR,要效果更好的话用百度或者有道这些在线引擎。

YOuKn0wHOw commented 4 months ago

我选择的是中文(简体,中国)我这边只有两个选项,另一个是英语(美国)

------------------ 原始邮件 ------------------ 发件人: "xulihang/ImageTrans-docs" @.>; 发送时间: 2024年5月23日(星期四) 下午5:17 @.>; @.**@.>; 主题: Re: [xulihang/ImageTrans-docs] 在使用imgagetrans2.12.2时ocrspace简体中文文字提取时遇到的报错 (Issue #653)

看不到图。WinRT的语言有选对吗?它需要系统自身有安装对应的语言。

image.png (view on web)

离线OCR里识别中文比较好的是PaddleOCR,要效果更好的话用百度或者有道这些在线引擎。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

xulihang commented 4 months ago

可以改用PaddleOCR,照这里的说明运行:https://github.com/xulihang/ImageTrans_plugins/tree/master/paddleOCR

YOuKn0wHOw commented 4 months ago

好滴,我试试,多谢解疑

------------------ 原始邮件 ------------------ 发件人: "Lihang @.>; 发送时间: 2024年5月23日(星期四) 下午5:37 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [xulihang/ImageTrans-docs] 在使用imgagetrans2.12.2时ocrspace简体中文文字提取时遇到的报错 (Issue #653)

可以改用PaddleOCR,照这里的说明运行:https://github.com/xulihang/ImageTrans_plugins/tree/master/paddleOCR

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>