tesseract-ocrHow can I set up tesseract OCR with GPU acceleration?
-
Install tesseract-ocr with GPU acceleration enabled:
$ git clone https://github.com/tesseract-ocr/tesseract
$ cd tesseract
$ ./autogen.sh
$ ./configure --enable-gpu --with-cuda-dir=/usr/local/cuda --with-cudnn-dir=/usr/local/cudnn
$ make
$ sudo make install
- Test GPU acceleration:
$ tesseract --list-langs
Output example
List of available languages (4):
eng
osd
- Set environment variables:
$ export TESSERACT_ENABLE_GPU=1
$ export TESSERACT_GPU_EXECUTABLE=/usr/local/cuda/bin/nvcc
- Run tesseract with GPU acceleration:
$ tesseract --oem 1 --psm 3 --tessdata-dir /usr/local/share/tessdata <image> <output>
-
Check the GPU usage with
nvidia-smicommand. -
For more information, see the Tesseract OCR documentation.
More of Tesseract Ocr
- How can I use Tesseract OCR with Vue.js?
- How do I download the Tesseract OCR software from the University of Mannheim?
- How can I integrate Tesseract OCR into a Unity project?
- How can I test Tesseract OCR online?
- How do I use Tesseract OCR?
- How can I tune Tesseract OCR for optimal accuracy?
- How do I set the Windows path for Tesseract OCR?
- How to install and use Tesseract OCR on Ubuntu 22.04?
- How do I access the official website of Tesseract OCR?
- How do I install Tesseract OCR on Windows?
See more codes...