Threshold used in lprnet inference sgie file does not work

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) jetson
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only) 4.5.1
• TensorRT Version 7
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) lprnet inference issue
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I have retrained lprnet and using for ocr. It is working , but the threshold is not working, I am unable to make the detection stricter using threshold. Please find my sgie file,
property]
gie-unique-id=2
network-type=1 # classifier
process-mode=2 # secondary
operate-on-gie-id=1
operate-on-class-ids=0

0=FP32, 1=INT8, 2=FP16 mode

network-mode=2
batch-size=4
tlt-encoded-model=us_lprnet_baseline18_deployable.etlt
model-engine-file=lpr_us_onnx_b4.engine
labelfile-path=labels.txt
tlt-model-key=nvidia_tlt
custom-lib-path=libnvinfer_custom_lpr_parser.so
parse-classifier-func-name=NvDsInferParseCustomNVPlate

num-detected-classes=3
output-blob-names=output_bbox/BiasAdd;output_cov/Sigmoid
net-scale-factor=0.00392156862745098
#0=RGB 1=BGR 2=GRAY
model-color-format=0
gpu-id=0
interval=0

#workspace-size=1024

[class-attrs-all]
threshold=.99
#classifier-threshold=0.99
#pre-cluster-threshold=0.99
#post-cluster-threshold=0.99

Tried all these different threshold, but none works, please help.

if parse-classifier-func-name is set, you need to use classifier-threshold in the custom NvDsInferParseCustomNVPlate, which has a parameter float classifierThreshold.

Hi, Thanks for your reply. So do I need to set a value for classifierThreshold at nvinfer_custom_lpr_parser.cpp file?
Cant I set it from the sgie config file?
However I already tried setting classifier-threshold in sgie config file and that did not make any impact or difference, so understood it did not work.
Can you advice.

No, becuase you are using custom NvDsInferParseCustomNVPlate. you need to use classifier-threshold in the custom NvDsInferParseCustomNVPlate, which has a parameter float classifierThreshold.

Hi,
Thanks a lot.
Can you suggest, How I can use the standard parse classifier and control it from sgie file?

please find parse-classifier-func-name in nvinfer. If not set, Gst-nvinfer uses the internal parsing function for softmax layers.

Hi,

Thanks a lot. I am still struggling, I am attaching the custom parser file, I tried to understand how to apply the filer in the custom parser cpp file, I could not find where classifier_threshold is used. Can you please have a look at the cpp find and suggest.
nvinfer_custom_lpr_parser.cpp (5.0 KB)

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

you can use the parameter “float classifierThreshold” in function NvDsInferParseCustomNVPlate. it should be same with classifier-threshold.

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