Optical Character Recognition installation to my Jetson Nano

How to install Optical Character Recognition (OCRnet Model) on Jetson Nano inside the jetson-inference…

How to install this OCR: Optical Character Recognition | NVIDIA NGC

Thank you!

Please refer to Deploying nvOCDR to DeepStream - NVIDIA Docs.

I tried working on downloading the pretrained models but it has an error

ngc: command not found

Please refer to the steps mentioned in https://org.ngc.nvidia.com/setup/installers/cli.

For Jetson device, please use the “ARM64 Linux” section.

I already downloaded the ngc cli and it is now working I did the downloading of OCRnet and OCDnet. I am confused about the one click script.

./build_docker.sh <path_to_ocdnet_onnx> <path_to_ocrnet_onnx> <path_to_ocr_character_list>
<ocdnet_height> <ocdnet_width>
<ocdnet_max_batch_size> <gpu_id>

I even cloned the NVIDIA Optical Character Detection and Recognition Solution to obtain the deepstream for build_docker.sh and I also gave permission for it to be an executable file. I double check the paths for the OCDnet and OCRnet but still this is the error I encounter. Pleaseee Helpp…

The error comes from NVIDIA-Optical-Character-Detection-and-Recognition-Solution/deepstream/build_docker.sh at a29cabf34661056910ba2861ad4e032dc71093e8 · NVIDIA-AI-IOT/NVIDIA-Optical-Character-Detection-and-Recognition-Solution · GitHub.
Please make sure the onnx files and txt files are available.

Hi!

I tried to do the step by step process instead in installing OCDnet and OCRnet but again I got stucked in to generate a TensorRT Engine for OCDnet and OCRnet. When I run this command line:

/usr/src/tensorrt/bin/trtexec --onnx=<path_to_pretrained ocdnet.onnx> --minShapes=input:1x3x736x1280 --optShapes=input:1x3x736x1280 --maxShapes=input:4x3x736x1280 --fp16 --saveEngine=<work_path>/ocdnet.fp16.engine

I replaced the path for onnx with the path where the ocdnet.onnx is located which is /home/pedicab/pretrained_models/ocdnet/ocdnet.onnx then I also replaced the <work_path> with /home/pedicab/pretrained_models/ocdnet

I received an error
Cuda failure: initialization error
Aborted (core dumped)


432338933_256795140831122_5026592776040106373_n

Which kind of ocdnet onnx did you download?

Hi

ngc registry model download-version nvidia/tao/ocdnet:deployable_v2.0 --dest ./pretrained_models
ngc registry model download-version nvidia/tao/ocrnet:deployable_v2.0 --dest ./pretrained_models

I run this code to download the OCR and OCD I just renamed the file and folder. I downloaded the version 2

For deployable_v2.0 in https://catalog.ngc.nvidia.com/orgs/nvidia/teams/tao/models/ocdnet/files?version=deployable_v2.0, it is based on fan_tiny_2x backbone. It is ViT based.
You can refer to GitHub - NVIDIA-AI-IOT/NVIDIA-Optical-Character-Detection-and-Recognition-Solution at a29cabf34661056910ba2861ad4e032dc71093e8.
Set --minShapes=input:1x3x736x1280 --optShapes=input:1x3x736x1280 --maxShapes=input:1x3x736x1280.

More, suggest you to download dcn_resnet18 version of ocdnet onnx file.
For ViT version, I am afraid Jetson nano will run with a low fps.

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