scene-text-recognition
scene-text-recognition copied to clipboard
Error when converting the detector to TRT
I followed instructions provided here: https://forums.developer.nvidia.com/t/object-detection-with-jetson-nano/198189 and was able to get the labeled images.
However, when trying to get the output from the RealSense I get this error and no output:
~/scene-text-recognition$ python3 video_capture.py
/home/xxxxxx/.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.get_device
Warning: Encountered known unsupported method torch.Tensor.is_complex
Finished converting detector to TRT
Testing TRT Model Difference:
tensor(1.4901e-07, device='cuda:0', grad_fn=<MaxBackward1>)
tensor(1.0014e-05, device='cuda:0', grad_fn=<MaxBackward1>)
As an update to this, and after following a few of the suggestions in the current repo's issues: I was able to run my own test against file images using the use_trt flag. However, I still get the same warnings as above when converting the detector to TRT. I don't get any errors, but no text is detected/recognized on test images (Which have been successfully tested using the GPU version of EasyOCR).
My board's info:
As an update to this, and after following a few of the suggestions in the current repo's issues: I was able to run my own test against file images using the use_trt flag. However, I still get the same warnings as above when converting the detector to TRT. I don't get any errors, but no text is detected/recognized on test images (Which have been successfully tested using the GPU version of EasyOCR).
My board's info:
have you solved this issue? I'm currently struggling with the same issue
are you able to solve this issue \
I could fix it following https://github.com/NVIDIA-AI-IOT/scene-text-recognition/issues/1#issuecomment-998527101 the answer in this issue, however when using TRT I get no text detection/recognition at all
Currently running JetPack 5.0.2, CUDA 11.4, TensorRT 8.4.2.1, PyTorch 0.13 from JetPack download center and torchvision 0.4