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-smi
command. -
For more information, see the Tesseract OCR documentation.
More of Tesseract Ocr
- How do I add Tesseract OCR to my environment variables?
- How do I install Tesseract-OCR using Yum?
- How do I set the Windows path for Tesseract OCR?
- How do tesseract ocr and easyocr compare in terms of accuracy and speed of text recognition?
- How can I use UiPath to implement Tesseract OCR language processing?
- How can I use Tesseract OCR to scan a QR code?
- How can I use Tesseract OCR with Golang?
- How can I use Tesseract to perform zonal OCR?
- How do I integrate tesseract OCR into a Qt application?
- How do I set the path for Tesseract OCR?
See more codes...