MyMonsterCat / RapidOcr-Java

🔥🔥🔥Java代码实现调用RapidOCR(基于PaddleOCR),适配Mac、Win、Linux,支持最新PP-OCRv4
Apache License 2.0
197 stars 28 forks source link

识别图片有时会使程序崩溃 #5

Closed rstyro closed 8 months ago

rstyro commented 8 months ago

使用的图片如下: test

崩溃报错信息如下: image

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_UNCAUGHT_CXX_EXCEPTION (0xe06d7363) at pc=0x00007ffd0b9b4ffc, pid=27056, tid=0x0000000000006840
#
# JRE version: Java(TM) SE Runtime Environment (8.0_311-b11) (build 1.8.0_311-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.311-b11 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [KERNELBASE.dll+0x64ffc]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\work_space\code_repo\medyj\hs_err_pid27056.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
numThread=6
modelsDir=C:\Users\10060\AppData\Local\Temp\ocrJava/onnx
det=ch_PP-OCRv3_det_infer.onnx
cls=ch_ppocr_mobile_v2.0_cls_infer.onnx
rec=ch_PP-OCRv4_rec_infer.onnx
keys=ppocr_keys_v1.txt
total keys size(6625)
imgDir=, imgName=D:\work_space\code_repo\medyj\16995167839096686923167976158733.png
Disconnected from the target VM, address: '127.0.0.1:11732', transport: 'socket'

能否修复一下,各位大佬

MyMonsterCat commented 8 months ago

你好感谢使用。

  1. 你的图片色彩通道是有问题的,是不是通过某种方式转成的png,所以直接识别是识别不了的
  2. 我通过截图工具截图了你发的图片,并将BoxThresh设置为0.5f,可以完全识别,识别效果和绘制后效果如下 result draw