OCR on Jetson Nano : https://github.com/NVIDIA-AI-IOT/scene-text-recognition

Hi ,

I am following above link to run text detection and recognition on jetson nano. I encountered a few problems . Can you help me with the following ?

  1. EasyOCR referred in the above repo no longer exists , due to which easyocr. Reader doesnt have use_trt option which would allow to use existing model . Now when i am running easyocr from pip install . It tries to train the model and OS kills the process due to Out of Memory Error ?
  2. Is there any alternative solution i can use for text detection using Jetson Nano ? or how can i run the above code ?

Hi,

You can apply for the training jobs on other dGPU environments.
Since Nano is quite limited in memory, it is not able to train a heavy model.

Do you encounter any errors when using the GitHub?
Although the default repo does not exist, it should work with the snapshot.

Thanks.

Hi @AastaLLL ,

Many Thanks for quick response . When i trying to build easyocr . I get below error . I checked pywt git repo as well and tried building it from there but there is no setup.py file there as well.

Installed /usr/local/lib/python3.6/dist-packages/easyocr-1.4-py3.6.egg
Processing dependencies for easyocr==1.4
Searching for PyWavelets>=1.1.1
Reading Links for pywavelets
/home/jetsonnano/.local/lib/python3.6/site-packages/pkg_resources/init.py:119: PkgResourcesDeprecationWarning: is an invalid version and will not be supported in a future release
PkgResourcesDeprecationWarning,
Downloading https://files.pythonhosted.org/packages/ee/ce/cfce0d615746d9b9ccc698401599183d6edb6d1bb0ae234bd717a840711d/pywavelets-1.5.0.tar.gz#sha256=d9e25c7cabef7ccd53f5fead26ab22152fe4cb937bad7411b5d506e2b5de38f6
Best match: pywavelets 1.5.0
Processing pywavelets-1.5.0.tar.gz
error: Couldn’t find a setup script in /tmp/easy_install-sqj6t80q/pywavelets-1.5.0.tar.gz

As it says easyocr is already active , i tried import easyocr . it fails with below error

Traceback (most recent call last):
File “”, line 1, in
File “/home/jetsonnano/Trials/scene-text-recognition/EasyOCR/easyocr/init.py”, line 1, in
from .easyocr import Reader
File “/home/jetsonnano/Trials/scene-text-recognition/EasyOCR/easyocr/easyocr.py”, line 39, in
from .detection import get_detector, get_textbox
File “/home/jetsonnano/Trials/scene-text-recognition/EasyOCR/easyocr/detection.py”, line 47, in
from .imgproc import resize_aspect_ratio, normalizeMeanVariance
File “/home/jetsonnano/Trials/scene-text-recognition/EasyOCR/easyocr/imgproc.py”, line 8, in
from skimage import io
File “/usr/local/lib/python3.6/dist-packages/scikit_image-0.17.2-py3.6-linux-aarch64.egg/skimage/io/init.py”, line 7, in
from .manage_plugins import *
File “/usr/local/lib/python3.6/dist-packages/scikit_image-0.17.2-py3.6-linux-aarch64.egg/skimage/io/manage_plugins.py”, line 23, in
from .collection import imread_collection_wrapper
File “/usr/local/lib/python3.6/dist-packages/scikit_image-0.17.2-py3.6-linux-aarch64.egg/skimage/io/collection.py”, line 13, in
from tifffile import TiffFile
File “/usr/local/lib/python3.6/dist-packages/tifffile-2024.2.12-py3.6.egg/tifffile/init.py”, line 3, in
from .tifffile import *
File “/usr/local/lib/python3.6/dist-packages/tifffile-2024.2.12-py3.6.egg/tifffile/tifffile.py”, line 1336
/,
^

Can you please help with this ?

Hi @AastaLLL ,

I managed to install easyocr without any errors but when i run the video_capture file . i again face the same problem where the process gets killed due to memory limitations.

It still looks to train the model instead of using the trained output although use_trt flag is set.

Any suggestions on this ?

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Hi,

Do you use Nano 2GB or Nano 4GB?
Could you monitor the system status with tegrastats to confirm the OOM issue?

$ sudo tegrastats

Thanks.