dpscreenocr icon indicating copy to clipboard operation
dpscreenocr copied to clipboard

Crash/BSOD on Windows 11 when using Hebrew

Open do2or opened this issue 2 years ago • 10 comments

Problem:

dpscreenocr uses Tesseract to recognize text on the screen. However, Tesseract has known issues with recognizing text from images captured by Intel UHD 600 graphics cards (like BSOD).

Solution:

Add support for Tesseract-OCR-DNN to dpscreenocr. Tesseract-OCR-DNN is a deep learning-based OCR engine that is not affected by the same issues as Tesseract.

Benefits:

Improved accuracy for recognizing text from images captured by Intel UHD600 graphics cards. Increased flexibility for users to choose the best OCR engine for their needs. Implementation:

Add a new configuration option to dpscreenocr that allows users to choose between using Tesseract or Tesseract-OCR-DNN. Update the code to use Tesseract-OCR-DNN when the new configuration option is set to "Tesseract-OCR-DNN".

Conclusion:

Adding support for Tesseract-OCR-DNN to dpscreenocr would be a valuable addition to the program. It would provide users with improved accuracy and flexibility, making it a more powerful tool for recognizing text on the screen.

do2or avatar Dec 11 '23 13:12 do2or

Tesseract has known issues with recognizing text from images captured by Intel UHD 600 graphics cards

I believe Tesseract itself doesn't care how an image was captured. Could you please provide more context (e.g., an example image or a link to the ticket on the Tesseract bug tracker)?

Or maybe you mean that dpScreenOCR has issues capturing images on machines with Intel UHD 600?

Tesseract-OCR-DNN is a deep learning-based OCR engine that is not affected by the same issues as Tesseract.

Googling for "Tesseract-OCR-DNN" gives no results. BTW, Tesseract already uses deep learning (LSTM).

danpla avatar Dec 11 '23 15:12 danpla

My problem is that every time I use this software, the computer shuts down or i get BSOD system crash, and for sure it is caused by the incompatibility of the video card with Tesseract

this is the instructions to build from source:

  1. Clone the Tesseract OCR Engine repository from [GitHub](https://github.com/tesseract-ocr/tesseract) using the following command: git clone https://github.com/tesseract-ocr/tesseract.git

  2. Install the dependencies required to build Tesseract. A C++ compiler with good C++17 support is required for building Tesseract from source. You can find the list of dependencies and installation instructions in the [README.md](https://github.com/tesseract-ocr/tesseract/blob/master/README.md) file of the repository.

  3. Once you have installed the dependencies, navigate to the root directory of the cloned repository and run the following commands: ./autogen.sh ./configure --enable-build-type=Release --enable-shared --disable-static --with-protoc=/usr/local/bin/protoc make -j4

  4. After the build process is complete, you can find the tesseract_ocr_dnn binary in the src/api directory.

do2or avatar Dec 11 '23 19:12 do2or

My problem is that every time I use this software, the computer shuts down or i get BSOD system crash,

So you are using Windows? Could you please tell your Windows and dpScreenOCR versions, and provide the steps to reproduce the crash/shutdown?

and for sure it is caused by the incompatibility of the video card with Tesseract

That's unlikely: Tesseract doesn't use GPU acceleration.

Clone the Tesseract OCR Engine repository from [GitHub](https://github.com/tesseract-ocr/tesseract)

The Tesseract library used by dpScreenOCR on Windows is already built from the official source code from https://github.com/tesseract-ocr/tesseract.

danpla avatar Dec 11 '23 19:12 danpla

my Windows version: Windows 11 dpScreenOCR version: 1.4.1 The procedure that causes the problem is when I use the software and capture some image, sometimes it turns off immediately and sometimes after a few minutes or crashes with a blue screen

do2or avatar Dec 11 '23 19:12 do2or

What languages do you use for OCR? Were they installed from the language manager or elsewhere?

danpla avatar Dec 11 '23 19:12 danpla

Language: hebrew and also this Tessdata https://gitlab.com/pninim.org/tessdata_heb_rashi/-/tree/main/tesseract_4.1.1?ref_type=heads

do2or avatar Dec 11 '23 19:12 do2or

Does using only English also cause a crash?

danpla avatar Dec 11 '23 19:12 danpla

I didn't try the English language, but I search for support in Google AI and it says there is a known incompatibility issues between the Intel UHD GPU and Tesseract 5 i try this GImageReader and work perfect and don't cause any bsod

do2or avatar Dec 11 '23 20:12 do2or

I don't currently have access to Windows 11, but I was unable to reproduce the issue with Windows 7 and 10. I have tried both the official Hebrew data and the files from https://gitlab.com/pninim.org/tessdata_heb_rashi/-/tree/main/tesseract_4.1.1.

It would help me if you could:

  • Check if the crash happens when using only the English language.
  • Check if the issue is reproducible in dpScreenOCR 1.1.0: https://github.com/danpla/dpscreenocr/releases/download/v1.1.0/dpScreenOCR-1.1.0-win32.zip

danpla avatar Dec 11 '23 23:12 danpla

Apparently version 1.1.0 does not cause any problem, but no I don't know for sure yet, I don't think that this issue it's related to English or Hebrew languages; I think that this issue is related to Tesseract 5

do2or avatar Dec 12 '23 18:12 do2or