Training OCRNet for being used for LPD/LPR

dGPU
DS 7

As follow up of the long thread here Tao toolkit observations - #63 by foreverneilyoung
I was following the notebook ocrnet/ocrnet-vit.ipynb in order to train OCRNet for German number plate recognition.

I first ran the notebook “as is” to see, what it gives. In the end I got this:

.
├── best_accuracy.onnx
├── status.json
└── trt.engine

I was using this ONNX model as replacement for my original LPR ONNX, trained this morning from lprnet/lprnet.ipynb with the following configuration:

[property]
gpu-id=0
# This model works. Trained from LPRNet
#onnx-file=models/LP/LPR/lprnet_epoch-024.onnx
onnx-file=models/LP/LPR/best_accuracy.onnx
labelfile-path=models/LP/LPR/labels_us.txt
batch-size=16
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=2
gie-unique-id=3
# This line is causing problems
output-blob-names=output_bbox/BiasAdd;output_cov/Sigmoid
#0=Detection 1=Classifier 2=Segmentation
network-type=1
parse-classifier-func-name=NvDsInferParseCustomNVPlate
custom-lib-path=nvinfer/libnvdsinfer_custom_impl_lpr.so
process-mode=2
operate-on-gie-id=2
net-scale-factor=0.00392156862745098
#net-scale-factor=1.0
#0=RGB 1=BGR 2=GRAY
model-color-format=0

[class-attrs-all]
threshold=0.5

But all I got was this:

0:00:10.346122630 24982      0x13cc760 ERROR                nvinfer gstnvinfer.cpp:676:gst_nvinfer_logger:<sgie2-lpr> NvDsInferContext[UID 3]: Error in NvDsInferContextImpl::preparePreprocess() <nvdsinfer_context_impl.cpp:1035> [UID = 3]: RGB/BGR input format specified but network input channels is not 3

PS: I already asked this in the DeepStream forum. I was considered to be too dumb to do the training well and forwarded to here to ask my stupid questions.

Original thread Training OCRNet for being used for LPD/LPR

I was considered to be too dumb to do the training well

This is surely the case

As we discussed in another topic, the LPRNet cannot meet your requirement.
OCRNet_vit network can work.
Suggest you firstly trained a model and verify it with tao model OCRNet inference instead of deepstream.
See OCRNet - NVIDIA Docs.