Text Recognition Issues

Hello, I am new in Jetson Nano. Please forgive me if I post in the wrong section.

I want to setup this project >>> github.c0m/NVIDIA-AI-IOT/scene-text-recognition

I setup it with different versions that works with too much delay (printing results after more than 15 seconds) using CPU (I think). Because, it gives me an error saying like “CUDA not available, this project can work faster with GPU”.

So I moved on another setup which is located here >>> Object Detection with Jetson Nano

I followed all the steps. And when use the test command I get this error:

nvidia@Jetson-Nano:~/Desktop/scene-text-recognition/EasyOCR$ python3 easy_ocr_demo.py /home/nvidia/Desktop/scene-text-recognition/docs/images/
on image /home/nvidia/Desktop/scene-text-recognition/docs/images/airport_amsterdam_signs.jpg
/home/nvidia/.local/lib/python3.6/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /media/nvidia/NVME/pytorch/pytorch-v1.9.0/c10/core/TensorImpl.h:1156.)
  return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
Traceback (most recent call last):
  File "easy_ocr_demo.py", line 45, in <module>
    result = reader.readtext(image)
  File "/home/nvidia/Desktop/scene-text-recognition/EasyOCR/easyocr/easyocr.py", line 460, in readtext
    add_margin, False)
  File "/home/nvidia/Desktop/scene-text-recognition/EasyOCR/easyocr/easyocr.py", line 335, in detect
    False, self.device, optimal_num_chars)
  File "/home/nvidia/Desktop/scene-text-recognition/EasyOCR/easyocr/detection.py", line 181, in get_textbox
    device, estimate_num_chars)
  File "/home/nvidia/Desktop/scene-text-recognition/EasyOCR/easyocr/detection.py", line 117, in test_net
    score_text = out[:, :, 0].cpu().data.numpy()
RuntimeError: CUDA error: the launch timed out and was terminated
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

And when I try to run the video_capture.py, I get this error:

nvidia@Jetson-Nano:~/Desktop/scene-text-recognition$ python3 video_capture.py 
/home/nvidia/.local/lib/python3.6/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /media/nvidia/NVME/pytorch/pytorch-v1.9.0/c10/core/TensorImpl.h:1156.)
  return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
Warning: Encountered known unsupported method torch.zeros
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.get_device
Warning: Encountered known unsupported method torch.Tensor.is_complex
Killed

Can anyone help me please?

Thank you.

Hi,

May I know the JetPack and PyTorch versions you used?

Please noted that the sample uses PyTorch v1.9.
You can get a prebuilt package with GPU support in the below topic:

Thanks.

Thanks for replying.

I am using JetPack 4.6.1 if I am right, the file name is: jetson-nano-jp461-sd-card-image.zip

PyTorch version I use is 1.9.0 as mentioned in the setup in this link >>> Object Detection with Jetson Nano

Update:
I have installed PyTorch v1.10.0 from the link you have mentioned you sent. The errors are not showing now, but I get “Killed” when I try to run easy_ocr_demo.py or video_capture.py

Note:
The script works when I disable GPU in video_captured.py by replacing:
this line: reader = easyocr.Reader([‘en’], use_trt=True)
with this : reader = easyocr.Reader([‘en’], gpu=False, verbose=False)

Hi,

Killed is usually caused by the OOM.
Could you monitor the system with tegrastats to see if there is any memory shortage occurs?

$ sudo tegrastats

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.